Hi,
I just tried to add zend-expressive-authentication + zend-expressive-authentication-session in a expressive project but i have a dependency problem… zend-expressive-authentication is 0.5.0 now. I know this modules still in dev but how to resolve that? Downgrade zend-expressive-authentication to 0.4.0? Or wait next zend-expressive-authentication-session version ?
Thanks!
Using version ^0.4.1 for zendframework/zend-expressive-authentication-session
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for zendframework/zend-expressive-authentication-session ^0.4.1 → satisfiable by zendframework/zend-expressive-authentication-session[0.4.1].
- zendframework/zend-expressive-authentication-session 0.4.1 requires zendframework/zend-expressive-authentication ^0.4.0 → satisfiable by zendframework/zend-expressive-authentication[0.4.0, 0.4.x-dev] but these conflict with your requirements or minimum-stability.
zend-expressive-authentication-session needs an update to be compatible with zend-expressive-authentication.
You can install both with composer require zend-expressive-authentication-basic
or add this manually to your composer.json file:
{
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"zendframework/zend-expressive-authentication": "^0.4.0",
"zendframework/zend-expressive-authentication-basic": "^0.3.0"
}
}
Zend Framework uses semver for versioning. This means that every minor version increase below 1.0.0 is considered a BC break. That’s why composer is not upgrading from 0.4 to 0.5.
Thanks for your answer! and for the #16 PR
@xtreamwayz When do you think your PR #16 will be merged?
Do you think it will have another BC break before a final release? (i mean also in all the authentication flow)
Yesterday.
I don’t know. I would say use it and give your feedback. When all related components are found stable it will be tagged as a stable release.
Good news! Thanks @xtreamwayz & @matthew!
Now i can get my user_id easily for the current logged user
$user = $request->getAttribute(UserInterface::class);
$userId = (int) $user->getDetail('user_id');
...
$datas = $this->testModel->getAllByUser($userId);
...
1 Like