Skip to content

allow unauthenticatedRedirect as array cake style. #714

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

Open
wants to merge 2 commits into
base: 3.x
Choose a base branch
from

Conversation

dereuromark
Copy link
Member

Seemed weird to me that in normal Cake context in a Cake plugin the URL cannot be defined in normal array style
if array, Router::url() is usually also used in other parts, and always allowed as alternative to strings.

@dereuromark dereuromark added this to the 3.next milestone Apr 20, 2025
@dereuromark dereuromark marked this pull request as ready for review April 20, 2025 14:52
@ADmad
Copy link
Member

ADmad commented Apr 20, 2025

...Seemed weird to me that in normal Cake context in a Cake plugin the URL cannot be defined in normal array style

That's cause this packages isn't a cake plugin. It can be used standalone. It doesn't have cakephp/cakephp as a dependency.

@dereuromark
Copy link
Member Author

dereuromark commented Apr 20, 2025

Ohh
Well, thats very theoretical, in all seriousness, is anyone actually using it outside the Cake world? :)

README also says

PSR7 Middleware authentication stack for the CakePHP framework.

@dereuromark
Copy link
Member Author

dereuromark commented Apr 20, 2025

It does have a cakephp/http dependency already
Just not the other packages

There is already a bit of dependency issues I guess:
The component uses

    return Router::normalize($logoutRedirect);

But that would then be outside the current dependencies.
I guess a "semi optional" component then.

That said: I am also fine if we close this and keep the "plugin" a "not plugin" :)

@ADmad
Copy link
Member

ADmad commented Apr 20, 2025

The component uses

Cause components are a Cake only thing and AuthComponent can't be used outside a cake app :)

@dereuromark
Copy link
Member Author

Yeah, makes sense.
Check added.

@LordSimal
Copy link
Contributor

The only real core dependency this plugin contains are related to exceptions and cookies.

image

I only know of chronos, which can be used standalone. But most other stuff is at least somewhat cakephp subpackge dependent.

But in the end I agree with dereuromark that it seems very unlikely, that this package is being used outside of the cakephp ecosystem.

@dereuromark
Copy link
Member Author

Well, for now nothing has to change (yet).
The "real plugin" discussion can be reopened in the future or when we major the plugin finally :)

@ADmad
Copy link
Member

ADmad commented Apr 20, 2025

The only real core dependency this plugin contains are related to exceptions and cookies.

@ADmad
Copy link
Member

ADmad commented Apr 20, 2025

The only real core dependency this plugin contains are related to exceptions and cookies.

cakephp/http is added as a dependency

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

Successfully merging this pull request may close these issues.

3 participants