-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Road to version 2 - Refactor and rewrite most of the library (#33)
* chore: Bump dev dependencies. * refactor: Remove `request` property, pass it to each methods instead. * chore: Update `composer.json` - Remove uneeded dev dependency. * docs: Update documentation. * tests: Update tests accordingly. * refactor: Use `loophp/psr17` dependency. * refactor: Remove dependency to `monolog/monolog`. * refactor: Merge `Handler` and `Service`. * refactor: Get rid of `Introspector`. * refactor: Make it PSR15 compatible. * refactor: Add more exceptions and update minor things here and there. * tests: Restore tests and update them according to latest changes. * refactor: Merge `ProxyValidate` and `ServiceValidate`. * refactor: Simplify configuration and reorganize code. * Fix `ServiceValidate` handler, restore `ProxyValidation` and update tests accordingly. * refactor: Simplify and rewrite handlers. * Update `CasResponseBuilder` to allow more granular customizations. * Fix `ProxyCallback`. * fix: Update `proxyCallback` handler, add note and fix test. * tests: Add missing tests, improve coverage. * chore: Require Psr17 stuff. * refactor: Add response factories. * refactor: Update factories, add interfaces. * Make sure `text/xml` can be converted. This is the kind of Content-Type header that EU Login is sending. * refactor: Fix Proxy handling. * Update Exception handling and PHPDoc. * Update documentation and URI parameter handling. BREAKING CHANGE: yes * Sync `.editorconfig` with `ecphp/php-library-template`. * Add more handler exceptions and fix an issue in the Service Validate, make it throws when the PGT is not available. * Update documentation pages.
- Loading branch information
Showing
81 changed files
with
3,207 additions
and
3,826 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,17 @@ | ||
Tests, code quality and code style | ||
================================== | ||
|
||
Every time changes are introduced into the library, `Travis CI`_ and `Github Actions`_ | ||
run the tests written with `PHPSpec`_. | ||
Every time changes are introduced into the library, the continuous integration | ||
system run and validate the tests. | ||
|
||
`PHPInfection`_ is also triggered used to ensure that your code is properly | ||
tested. | ||
A PHP quality tool, Grumphp_, is used to orchestrate all these tasks at each | ||
commit on the local machine, but also on the continuous integration tool in use. | ||
|
||
The code style is based on `PSR-12`_ plus a set of custom rules. | ||
Find more about the code style in use in the package `drupol/php-conventions`_. | ||
|
||
A PHP quality tool, Grumphp_, is used to orchestrate all these tasks at each commit | ||
on the local machine, but also on the continuous integration tools (Travis, Github actions) | ||
|
||
To run the whole tests tasks locally, do | ||
To run the tests locally: | ||
|
||
.. code-block:: bash | ||
composer grumphp | ||
or | ||
|
||
.. code-block:: bash | ||
./vendor/bin/grumphp run | ||
Here's an example of output that shows all the tasks that are setup in Grumphp and that | ||
will check your code | ||
|
||
.. code-block:: bash | ||
$ ./vendor/bin/grumphp run | ||
GrumPHP is sniffing your code! | ||
Running task 1/13: SecurityChecker... ✔ | ||
Running task 2/13: Composer... ✔ | ||
Running task 3/13: ComposerNormalize... ✔ | ||
Running task 4/13: YamlLint... ✔ | ||
Running task 5/13: JsonLint... ✔ | ||
Running task 6/13: PhpLint... ✔ | ||
Running task 7/13: TwigCs... ✔ | ||
Running task 8/13: PhpCsAutoFixerV2... ✔ | ||
Running task 9/13: PhpCsFixerV2... ✔ | ||
Running task 10/13: Phpcs... ✔ | ||
Running task 11/13: PhpStan... ✔ | ||
Running task 12/13: Phpspec... ✔ | ||
Running task 13/13: Infection... ✔ | ||
$ | ||
.. _PSR-12: https://www.php-fig.org/psr/psr-12/ | ||
.. _drupol/php-conventions: https://github.com/drupol/php-conventions | ||
.. _Travis CI: https://travis-ci.org/ecphp/cas-lib/builds | ||
.. _Github Actions: https://github.com/ecphp/cas-lib/actions | ||
.. _PHPSpec: http://www.phpspec.net/ | ||
.. _PHPInfection: https://github.com/infection/infection | ||
.. _Grumphp: https://github.com/phpro/grumphp | ||
.. _ecphp/php-conventions: https://github.com/ecphp/php-conventions | ||
.. _Grumphp: https://github.com/phpro/grumphp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.