Skip to content

Commit

Permalink
Merge pull request #711 from TomHAnderson/hotfix/version-4.0.6b
Browse files Browse the repository at this point in the history
Fixes for Composer 2 for 4.0.6
  • Loading branch information
TomHAnderson committed Nov 13, 2020
2 parents 6b13045 + e19ec5a commit 48b5d77
Show file tree
Hide file tree
Showing 69 changed files with 417 additions and 367 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"symfony/console": "^5.0"
},
"require-dev": {
"doctrine/coding-standard": "^7.0",
"doctrine/coding-standard": "^8.2",
"laminas/laminas-i18n": "^2.7",
"laminas/laminas-log": "^2.9",
"laminas/laminas-modulemanager": "^2.8",
Expand Down
13 changes: 7 additions & 6 deletions src/DoctrineModule/Authentication/Adapter/ObjectRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Laminas\Authentication\Adapter\AbstractAdapter;
use Laminas\Authentication\Adapter\Exception;
use Laminas\Authentication\Result as AuthenticationResult;

use function call_user_func;
use function get_class;
use function method_exists;
Expand Down Expand Up @@ -45,7 +46,7 @@ public function __construct($options = [])
/**
* @param mixed[]|AuthenticationOptions $options
*/
public function setOptions($options) : self
public function setOptions($options): self
{
if (! $options instanceof AuthenticationOptions) {
$options = new AuthenticationOptions($options);
Expand All @@ -56,12 +57,12 @@ public function setOptions($options) : self
return $this;
}

public function getOptions() : AuthenticationOptions
public function getOptions(): AuthenticationOptions
{
return $this->options;
}

public function authenticate() : AuthenticationResult
public function authenticate(): AuthenticationResult
{
$this->setup();
$options = $this->options;
Expand All @@ -85,7 +86,7 @@ public function authenticate() : AuthenticationResult
*
* @throws Exception\UnexpectedValueException
*/
protected function validateIdentity(object $identity) : AuthenticationResult
protected function validateIdentity(object $identity): AuthenticationResult
{
$credentialProperty = $this->options->getCredentialProperty();
$getter = 'get' . Inflector::classify($credentialProperty);
Expand Down Expand Up @@ -135,7 +136,7 @@ protected function validateIdentity(object $identity) : AuthenticationResult
* @throws Exception\RuntimeException In the event that setup was not
* done properly throw exception.
*/
protected function setup() : void
protected function setup(): void
{
if ($this->identity === null) {
throw new Exception\RuntimeException(
Expand All @@ -162,7 +163,7 @@ protected function setup() : void
* Creates a Laminas\Authentication\Result object from the information that has been collected
* during the authenticate() attempt.
*/
protected function createAuthenticationResult() : AuthenticationResult
protected function createAuthenticationResult(): AuthenticationResult
{
return new AuthenticationResult(
$this->authenticationResultInfo['code'],
Expand Down
10 changes: 5 additions & 5 deletions src/DoctrineModule/Authentication/Storage/ObjectRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ObjectRepository implements StorageInterface
/**
* @param mixed[]|AuthenticationOptions $options
*/
public function setOptions($options) : ObjectRepository
public function setOptions($options): ObjectRepository
{
if (! $options instanceof AuthenticationOptions) {
$options = new AuthenticationOptions($options);
Expand All @@ -41,7 +41,7 @@ public function __construct($options = [])
$this->setOptions($options);
}

public function isEmpty() : bool
public function isEmpty(): bool
{
return $this->options->getStorage()->isEmpty();
}
Expand All @@ -50,7 +50,7 @@ public function isEmpty() : bool
* This function assumes that the storage only contains identifier values (which is the case if
* the ObjectRepository authentication adapter is used).
*/
public function read() : ?object
public function read(): ?object
{
$identity = $this->options->getStorage()->read();
if ($identity) {
Expand All @@ -74,15 +74,15 @@ public function readKeyOnly()
/**
* @param mixed $identity
*/
public function write($identity) : void
public function write($identity): void
{
$metadataInfo = $this->options->getClassMetadata();
$identifierValues = $metadataInfo->getIdentifierValues($identity);

$this->options->getStorage()->write($identifierValues);
}

public function clear() : void
public function clear(): void
{
$this->options->getStorage()->clear();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Laminas\Console\Request;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Console\Input\InputDefinition;

use function is_numeric;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@

use Symfony\Component\Console\Formatter\OutputFormatterInterface;
use Symfony\Component\Console\Output\Output;

use function function_exists;
use function getenv;
use function posix_isatty;

use const DIRECTORY_SEPARATOR;
use const PHP_EOL;
use const STDOUT;
Expand Down Expand Up @@ -51,7 +53,7 @@ public function getMessage()
return $this->message;
}

protected function hasColorSupport() : bool
protected function hasColorSupport(): bool
{
if (DIRECTORY_SEPARATOR === '\\') {
return getenv('ANSICON') !== false || getenv('ConEmuANSI') === 'ON';
Expand Down
16 changes: 8 additions & 8 deletions src/DoctrineModule/ConfigProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ConfigProvider
/**
* @return mixed[]
*/
public function __invoke() : array
public function __invoke(): array
{
return [
'doctrine' => $this->getDoctrineConfig(),
Expand All @@ -32,7 +32,7 @@ public function __invoke() : array
*
* @return mixed[]
*/
public function getDependencyConfig() : array
public function getDependencyConfig(): array
{
// phpcs:disable Generic.Files.LineLength
return [
Expand All @@ -49,7 +49,7 @@ public function getDependencyConfig() : array
*
* @return mixed[]
*/
public function getControllerConfig() : array
public function getControllerConfig(): array
{
return [
'factories' => ['DoctrineModule\Controller\Cli' => 'DoctrineModule\Service\CliControllerFactory'],
Expand All @@ -61,7 +61,7 @@ public function getControllerConfig() : array
*
* @return mixed[]
*/
public function getRouteManagerConfig() : array
public function getRouteManagerConfig(): array
{
return [
'factories' => ['symfony_cli' => 'DoctrineModule\Service\SymfonyCliRouteFactory'],
Expand All @@ -73,7 +73,7 @@ public function getRouteManagerConfig() : array
*
* @return mixed[]
*/
public function getConsoleConfig() : array
public function getConsoleConfig(): array
{
return [
'router' => [
Expand All @@ -89,7 +89,7 @@ public function getConsoleConfig() : array
*
* @return mixed[]
*/
public function getDoctrineConfig() : array
public function getDoctrineConfig(): array
{
return [
'cache' => [
Expand Down Expand Up @@ -171,7 +171,7 @@ public function getDoctrineConfig() : array
*
* @return mixed[]
*/
public function getDoctrineFactoryConfig() : array
public function getDoctrineFactoryConfig(): array
{
return [
'cache' => 'DoctrineModule\Service\CacheFactory',
Expand All @@ -186,7 +186,7 @@ public function getDoctrineFactoryConfig() : array
/**
* @return mixed[]
*/
public function getValidatorConfig() : array
public function getValidatorConfig(): array
{
return [
'aliases' => [
Expand Down
3 changes: 2 additions & 1 deletion src/DoctrineModule/Controller/CliController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Laminas\Mvc\Controller\AbstractActionController;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Output\OutputInterface;

use function is_numeric;

/**
Expand All @@ -27,7 +28,7 @@ public function __construct(Application $cliApplication)
$this->cliApplication = $cliApplication;
}

public function setOutput(OutputInterface $output) : void
public function setOutput(OutputInterface $output): void
{
$this->output = $output;
}
Expand Down
7 changes: 4 additions & 3 deletions src/DoctrineModule/Form/Element/ObjectMultiCheckbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Laminas\Form\Element\MultiCheckbox;
use Laminas\Stdlib\ArrayUtils;
use Traversable;

use function array_map;
use function is_array;

Expand All @@ -15,7 +16,7 @@ class ObjectMultiCheckbox extends MultiCheckbox
/** @var Proxy */
protected $proxy;

public function getProxy() : Proxy
public function getProxy(): Proxy
{
if ($this->proxy === null) {
$this->proxy = new Proxy();
Expand All @@ -27,7 +28,7 @@ public function getProxy() : Proxy
/**
* @param mixed $options
*/
public function setOptions($options) : self
public function setOptions($options): self
{
$this->getProxy()->setOptions($options);

Expand All @@ -38,7 +39,7 @@ public function setOptions($options) : self
* @param mixed $value
* @param mixed $key
*/
public function setOption($key, $value) : self
public function setOption($key, $value): self
{
$this->getProxy()->setOptions([$key => $value]);

Expand Down
6 changes: 3 additions & 3 deletions src/DoctrineModule/Form/Element/ObjectRadio.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ObjectRadio extends RadioElement
/** @var Proxy */
protected $proxy;

public function getProxy() : Proxy
public function getProxy(): Proxy
{
if ($this->proxy === null) {
$this->proxy = new Proxy();
Expand All @@ -26,7 +26,7 @@ public function getProxy() : Proxy
*
* {@inheritDoc}
*/
public function setOptions($options) : self
public function setOptions($options): self
{
$this->getProxy()->setOptions($options);

Expand All @@ -38,7 +38,7 @@ public function setOptions($options) : self
*
* {@inheritDoc}
*/
public function setOption($key, $value) : self
public function setOption($key, $value): self
{
$this->getProxy()->setOptions([$key => $value]);

Expand Down
7 changes: 4 additions & 3 deletions src/DoctrineModule/Form/Element/ObjectSelect.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Laminas\Form\Element\Select as SelectElement;
use Laminas\Stdlib\ArrayUtils;
use Traversable;

use function array_map;
use function is_array;

Expand All @@ -15,7 +16,7 @@ class ObjectSelect extends SelectElement
/** @var Proxy */
protected $proxy;

public function getProxy() : Proxy
public function getProxy(): Proxy
{
if ($this->proxy === null) {
$this->proxy = new Proxy();
Expand All @@ -29,7 +30,7 @@ public function getProxy() : Proxy
*
* {@inheritDoc}
*/
public function setOptions($options) : self
public function setOptions($options): self
{
$this->getProxy()->setOptions($options);

Expand All @@ -41,7 +42,7 @@ public function setOptions($options) : self
*
* {@inheritDoc}
*/
public function setOption($key, $value) : self
public function setOption($key, $value): self
{
$this->getProxy()->setOptions([$key => $value]);

Expand Down

0 comments on commit 48b5d77

Please sign in to comment.