symfony / recipes-contrib

Symfony Contrib Recipes Repositories
https://github.com/symfony/recipes-contrib/blob/flex/main/RECIPES.md
MIT License
528 stars 630 forks source link

ecphp/cas-bundle: add recipe for version 3.0 #1687

Closed drupol closed 1 month ago

drupol commented 1 month ago
Q A
License MIT
Packagist https://packagist.org/packages/ecphp/cas-bundle
github-actions[bot] commented 1 month ago

Thanks for the PR 😍

How to test these changes in your application

  1. Define the SYMFONY_ENDPOINT environment variable:

    # On Unix-like (BSD, Linux and macOS)
    export SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes-contrib/flex/pull-1687/index.json
    # On Windows
    SET SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes-contrib/flex/pull-1687/index.json
  2. Install the package(s) related to this recipe:

    composer req 'symfony/flex:^1.16'
    composer req 'ecphp/cas-bundle:^3.0'
  3. Don't forget to unset the SYMFONY_ENDPOINT environment variable when done:

    # On Unix-like (BSD, Linux and macOS)
    unset SYMFONY_ENDPOINT
    # On Windows
    SET SYMFONY_ENDPOINT=

Diff between recipe versions

In order to help with the review stage, I'm in charge of computing the diff between the various versions of patched recipes. I'm going keep this comment up to date with any updates of the attached patch.

ecphp/cas-bundle

1.0 vs 2.0 ```diff ```
2.0 vs 3.0 ```diff diff --git a/ecphp/cas-bundle/3.0/config/packages/dev/cas_bundle.yaml b/ecphp/cas-bundle/3.0/config/packages/dev/cas_bundle.yaml new file mode 100644 index 00000000..5697bf90 --- /dev/null +++ b/ecphp/cas-bundle/3.0/config/packages/dev/cas_bundle.yaml @@ -0,0 +1,24 @@ +cas: + # Change the URL to your own CAS server + base_url: https://ecas.ec.europa.eu/cas + protocol: + login: + path: /login + default_parameters: + service: cas_bundle_homepage + serviceValidate: + path: /p3/serviceValidate + default_parameters: + format: JSON + #pgtUrl: cas_bundle_proxy_callback + logout: + path: /logout + default_parameters: + service: cas_bundle_homepage + proxy: + path: /proxy + proxyValidate: + path: /p3/proxyValidate + default_parameters: + format: JSON + #pgtUrl: cas_bundle_proxy_callback diff --git a/ecphp/cas-bundle/3.0/config/packages/dev/cas_security.yaml b/ecphp/cas-bundle/3.0/config/packages/dev/cas_security.yaml new file mode 100644 index 00000000..9595b42e --- /dev/null +++ b/ecphp/cas-bundle/3.0/config/packages/dev/cas_security.yaml @@ -0,0 +1,4 @@ +security: + providers: + cas: + id: EcPhp\CasBundle\Security\Core\User\CasUserProvider diff --git a/ecphp/cas-bundle/3.0/config/routes/cas.yaml b/ecphp/cas-bundle/3.0/config/routes/cas.yaml new file mode 100644 index 00000000..a8ec5e45 --- /dev/null +++ b/ecphp/cas-bundle/3.0/config/routes/cas.yaml @@ -0,0 +1,3 @@ +cas_bundle: + resource: "@CasBundle/Resources/config/routes/routes.php" + prefix: /cas diff --git a/ecphp/cas-bundle/2.0/manifest.json b/ecphp/cas-bundle/3.0/manifest.json index 272a15d0..33e525ce 100644 --- a/ecphp/cas-bundle/2.0/manifest.json +++ b/ecphp/cas-bundle/3.0/manifest.json @@ -1,8 +1,10 @@ { "bundles": { - "EcPhp\\CasBundle\\CasBundle": ["all"] + "EcPhp\\CasBundle\\CasBundle": [ + "all" + ] }, - "copy-from-package": { - "Resources/config/": "%CONFIG_DIR%/" + "copy-from-recipe": { + "config/": "%CONFIG_DIR%/" } } ```
drupol commented 1 month ago

The build issue make sense since we let the user choosing with which psr7 implementation they want to work with.

Installing this bundle is usually done by doing: composer require nyholm/psr7 ecphp/cas-bundle

drupol commented 1 month ago

Cool, thanks!