Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 5c9fe084 authored by Bogdan BOCIOACA's avatar Bogdan BOCIOACA Committed by Pol Dellaiera
Browse files

Initial commit

parents
Branches
Tags
No related merge requests found
Showing with 489 additions and 0 deletions
{
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": true,
"commitLimit": false,
"hideCredit": true,
"sortCommits": "date-desc",
"breakingPattern": "BREAKING CHANGE: yes"
}
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org
# PHP PSR-2 Coding Standards
# http://www.php-fig.org/psr/psr-2/
root = true
[*.{php,inc,module}]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 4
max_line_length = 120
[*.{json,json.dist,yml,yaml,yml.dist,yaml.dist}]
indent_style = space
indent_size = 4
max_line_length = 120
[*.{md}]
indent_style = space
indent_size = 2
max_line_length = 80
.envrc 0 → 100644
use flake github:loophp/nix-auto-changelog
use flake github:loophp/nix-shell#env-php81 --impure
/.github export-ignore
/docker export-ignore
/docs export-ignore
/spec export-ignore
/tests export-ignore
/.auto-changelog export-ignore
/.editorconfig export-ignore
/.envrc export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.prettierignore export-ignore
/.prettierrc export-ignore
/.scrutinizer.yml export-ignore
/CHANGELOG.md export-ignore
/docker-compose.yaml export-ignore
/grumphp.yml.dist export-ignore
/infection.json.dist export-ignore
/LICENSE export-ignore
/MAINTAINERS.txt export-ignore
/phpspec.yml.dist export-ignore
/phpstan.neon export-ignore
/psalm.xml export-ignore
/README.md export-ignore
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of
experience, nationality, personal appearance, race, religion, or sexual identity
and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, or to ban temporarily or permanently any
contributor for other behaviors that they deem inappropriate, threatening,
offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at pol.dellaiera@protonmail.com. The
project team will review and investigate all complaints, and will respond in a
way that it deems appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an
incident. Further details of specific enforcement policies may be posted
separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
# CONTRIBUTING
We're using Github Actions as a continuous integration system.
## Tests
We're using [`grumphp/grumphp`](https://github.com/phpro/grumphp) to drive the
development.
Run
```bash
./vendor/bin/grumphp run
```
to run all the tests.
## Coding Standards
We are using [`ecphp/php-conventions`](https://github.com/ecphp/php-conventions)
to enforce coding standards.
Run
```bash
./vendor/bin/grumphp run
```
to automatically detect/fix coding standard violations.
## Steps required to reproduce the problem
1.
2.
3.
## Expected Result
-
## Actual Result
-
This PR
- [x]
- [ ]
- [ ]
Follows #. Related to #. Fixes #.
version: 2
updates:
- package-ecosystem: composer
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
# https://github.com/probot/settings
labels:
- name: bug
color: ee0701
- name: dependencies
color: 0366d6
- name: enhancement
color: 0e8a16
- name: question
color: cc317c
- name: security
color: ee0701
- name: stale
color: eeeeee
repository:
allow_merge_commit: true
allow_rebase_merge: false
allow_squash_merge: true
default_branch: main
description:
"A bundle for Laravel, providing authentication against eCas, the Central Authentication Service server of
European Commission."
homepage: https://github.com/ecphp/laravel-ecas
topics: authentication,cas,ecas,single-sign-on
has_downloads: true
has_issues: true
has_pages: false
has_projects: false
has_wiki: false
name: laravel-ecas
private: false
teams:
- name: core
permission: push
daysUntilStale: 60
daysUntilClose: 7
staleLabel: stale
markComment: >
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no
further activity occurs. Thank you for your contributions.
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
on:
push:
branches:
- main
pull_request:
name: "Continuous Integration"
jobs:
supported-versions-matrix:
name: Supported Versions Matrix
runs-on: ubuntu-latest
outputs:
version: ${{ steps.supported-versions-matrix.outputs.version }}
steps:
- uses: actions/checkout@v3
- id: supported-versions-matrix
uses: WyriHaximus/github-action-composer-php-versions-in-range@v1
tests:
name: "Unit Tests"
runs-on: ${{ matrix.operating-system }}
needs:
- supported-versions-matrix
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
php: ${{ fromJson(needs.supported-versions-matrix.outputs.version) }}
steps:
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout
uses: actions/checkout@v3
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: pcov
- name: Install dependencies
uses: ramsey/composer-install@v2
- name: Run Grumphp
run: vendor/bin/grumphp run
env:
PHP_CS_FIXER_IGNORE_ENV: 1
- name: Send Scrutinizer data
run: |
composer require scrutinizer/ocular --dev
vendor/bin/ocular code-coverage:upload --format=php-clover build/logs/coverage/clover.xml
continue-on-error: true
name: Prettier checks
# This action works with pull requests and pushes
on:
pull_request:
push:
branches:
- main
jobs:
prettier:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install the Nix package manager
uses: cachix/install-nix-action@v18
- name: Checks
run: nix run nixpkgs#nodePackages.prettier -- --check .
# https://docs.github.com/en/actions
name: "Release"
on:
push:
tags:
- "**"
jobs:
release:
name: "Tag"
runs-on: "ubuntu-latest"
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Determine tag
id: tag_name
run: |
echo ::set-output name=current_version::${GITHUB_REF#refs/tags/}
shell: bash
- name: Get Changelog Entry
id: changelog_reader
uses: mindsers/changelog-reader-action@v2
with:
version: ${{ steps.tag_name.outputs.current_version }}
path: ./CHANGELOG.md
- name: "Create release"
uses: "actions/create-release@v1"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
release_name: "${{ steps.tag_name.outputs.current_version }}"
tag_name: "${{ steps.tag_name.outputs.current_version }}"
body: ${{ steps.changelog_reader.outputs.changes }}
prerelease: ${{ steps.changelog_reader.outputs.status == 'prereleased' }}
draft: ${{ steps.changelog_reader.outputs.status == 'unreleased' }}
/.direnv/
/.idea/
/build/
/vendor
composer.lock
.php_cs.cache
/.direnv/
/.idea/
/build/
/vendor/
/docs/
CHANGELOG.md
\ No newline at end of file
{
"proseWrap": "always"
}
build:
image: default-bionic
nodes:
php81:
environment:
php:
version: 8.1
pecl_extensions:
- pcov
filter:
paths:
- "src/*"
tools:
external_code_coverage:
timeout: 600
php_loc: true
php_pdepend: true
php_sim: true
php_changetracking: true
LICENSE 0 → 100644
BSD 3-Clause License
Copyright (c) 2019-2023, European Union.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Laravel eCas Bundle
An ECAS bundle for Laravel.
## Installation
```shell
composer require ecphp/laravel-ecas
```
`config/app.php`
```php
'providers' => [
...
EcPhp\LaravelEcas\Providers\LaravelEcasProvider::class,
],
```
`app/Providers/AppServiceProvider.php`
```php
<?php
declare(strict_types=1);
use Illuminate\Contracts\Foundation\Application;
use loophp\psr17\Psr17Interface;
use Nyholm\Psr7\Factory\Psr17Factory;
use loophp\psr17\Psr17;
public function register(): void
{
$this->app->bind(
Psr17Interface::class,
function(Application $app): Psr17Interface {
$psr17Factory = new Psr17Factory();
//or whatever psr17 you want
return new Psr17(
$psr17Factory,
$psr17Factory,
$psr17Factory,
$psr17Factory,
$psr17Factory,
$psr17Factory
);
}
);
}
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment