Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Oct 13, 2024

Conversation

drupol
Copy link
Contributor

@drupol drupol commented Oct 9, 2024

@symfony-recipes-bot symfony-recipes-bot enabled auto-merge (squash) October 9, 2024 09:05
Copy link

github-actions bot commented Oct 9, 2024

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
2.0 vs 3.0
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%/"
     }
 }

auto-merge was automatically disabled October 9, 2024 09:14

Head branch was pushed to by a user without write access

@symfony-recipes-bot symfony-recipes-bot enabled auto-merge (squash) October 9, 2024 09:14
@drupol
Copy link
Contributor Author

drupol commented Oct 9, 2024

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

@symfony-recipes-bot symfony-recipes-bot merged commit 5de741d into symfony:main Oct 13, 2024
1 of 2 checks passed
@drupol drupol deleted the push-orvrtwtmoxou branch October 13, 2024 10:21
@drupol
Copy link
Contributor Author

drupol commented Oct 13, 2024

Cool, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants