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

merge 2.next into 3.x #630

Merged
merged 12 commits into from
Sep 4, 2023
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- 2.x
- 2.next
pull_request:
branches:
- '*'
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
/composer.lock
/phpunit.xml
/tmp
/tools
/vendor
/tools
.phpunit.result.cache
.phpunit.cache

# OS generated files #
Expand Down
26 changes: 0 additions & 26 deletions psalm-baseline.xml

This file was deleted.

1 change: 0 additions & 1 deletion psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
findUnusedPsalmSuppress="true"
findUnusedBaselineEntry="true"
findUnusedCode="false"
errorBaseline="psalm-baseline.xml"
>
<projectFiles>
<directory name="src" />
Expand Down
2 changes: 1 addition & 1 deletion src/AbstractCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
use Cake\Core\ObjectRegistry;

/**
* @template TObject of object
* @template TObject of \Authentication\Identifier\IdentifierInterface|\Authentication\Authenticator\AuthenticatorInterface
* @extends \Cake\Core\ObjectRegistry<TObject>
*/
abstract class AbstractCollection extends ObjectRegistry
Expand Down
4 changes: 0 additions & 4 deletions src/AuthenticationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ public function authenticators(): AuthenticatorCollection
* @param string $name Name or class name.
* @param array $config Authenticator configuration.
* @return \Authentication\Authenticator\AuthenticatorInterface
* @psalm-suppress MoreSpecificImplementedParamType
*/
public function loadAuthenticator(string $name, array $config = []): AuthenticatorInterface
{
Expand All @@ -165,7 +164,6 @@ public function loadAuthenticator(string $name, array $config = []): Authenticat
* @param string $name Name or class name.
* @param array $config Identifier configuration.
* @return \Authentication\Identifier\IdentifierInterface Identifier instance
* @psalm-suppress MoreSpecificImplementedParamType
*/
public function loadIdentifier(string $name, array $config = []): IdentifierInterface
{
Expand Down Expand Up @@ -429,11 +427,9 @@ public function getLoginRedirect(ServerRequestInterface $request): ?string
return null;
}
$parsed += ['path' => '/', 'query' => ''];
/** @psalm-suppress PossiblyUndefinedArrayOffset */
if (strlen($parsed['path']) && $parsed['path'][0] !== '/') {
$parsed['path'] = "/{$parsed['path']}";
}
/** @psalm-suppress PossiblyUndefinedArrayOffset */
if ($parsed['query']) {
$parsed['query'] = "?{$parsed['query']}";
}
Expand Down
1 change: 0 additions & 1 deletion src/Authenticator/AuthenticatorCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ public function __construct(IdentifierCollection $identifiers, array $config = [
* @param array $config Config array.
* @return \Authentication\Authenticator\AuthenticatorInterface
* @throws \RuntimeException
* @psalm-suppress MoreSpecificImplementedParamType
*/
protected function _create(object|string $class, string $alias, array $config): AuthenticatorInterface
{
Expand Down
1 change: 0 additions & 1 deletion src/Identifier/IdentifierCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ public function identify(array $credentials): ArrayAccess|array|null
* @param array $config Config array.
* @return \Authentication\Identifier\IdentifierInterface
* @throws \RuntimeException
* @psalm-suppress MoreSpecificImplementedParamType
*/
protected function _create(object|string $class, string $alias, array $config): IdentifierInterface
{
Expand Down
5 changes: 1 addition & 4 deletions src/Identifier/Ldap/ExtensionAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,7 @@ public function unbind(): void
}

$this->_setErrorHandler();
/**
* @psalm-suppress InvalidArgument
* @phpstan-ignore-next-line
*/
/** @phpstan-ignore-next-line */
ldap_unbind($this->_connection);
$this->_unsetErrorHandler();

Expand Down
2 changes: 1 addition & 1 deletion src/Identifier/Resolver/OrmResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function find(array $conditions, string $type = self::TYPE_AND): ArrayAcc
{
$table = $this->getTableLocator()->get($this->_config['userModel']);

$query = $table->query();
$query = $table->selectQuery();
$finders = (array)$this->_config['finder'];
foreach ($finders as $finder => $options) {
if (is_string($options)) {
Expand Down
2 changes: 1 addition & 1 deletion src/Identity.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public function offsetExists(mixed $offset): bool
*
* @link https://php.net/manual/en/arrayaccess.offsetget.php
* @param mixed $offset Offset
* @return mixed
* @return \Authentication\IdentityInterface|null
*/
public function offsetGet(mixed $offset): mixed
{
Expand Down
2 changes: 1 addition & 1 deletion src/IdentityInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/**
* Identity interface
*
* @extends \ArrayAccess<string, mixed>
* @template-extends \ArrayAccess<int, \Authentication\IdentityInterface>
*/
interface IdentityInterface extends ArrayAccess
{
Expand Down