Skip to content

Commit

Permalink
✨ Allow to use codeception 5 (#14)
Browse files Browse the repository at this point in the history
* ✨ Allow to use codeception 5
- prepare composer.json to allow php8 and greater only
- update codeception in composer.json
- preapre classes which extend codeception core
- ...
  • Loading branch information
daniel-rose authored Dec 13, 2022
1 parent f3b1e7d commit cab9644
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-versions: ["7.3", "7.4", "8.0", "8.1", "8.2"]
php-versions: ["8.0", "8.1", "8.2"]
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
}
],
"require": {
"php": ">=7.3",
"codeception/codeception": "^2.0.0 || ^3.0.0 || ^4.0.0",
"php": ">=8.0",
"codeception/codeception": "^5.0.0",
"spryker/propel": "^3.20.0",
"spryker/search": "^8.0.0",
"spryker/search-elasticsearch": "^1.0.0",
Expand Down
14 changes: 7 additions & 7 deletions src/FondOfCodeception/Module/Spryker.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Spryker extends Module
/**
* @var array
*/
protected $config = [
protected array $config = [
SprykerConstants::CONFIG_GENERATE_TRANSFER => true,
SprykerConstants::CONFIG_GENERATE_MAP_CLASSES => true,
SprykerConstants::CONFIG_GENERATE_PROPEL_CLASSES => true,
Expand All @@ -29,27 +29,27 @@ class Spryker extends Module
/**
* @var \FondOfCodeception\Lib\NullLoggerFactory
*/
protected $nullLoggerFactory;
protected NullLoggerFactory $nullLoggerFactory;

/**
* @var \FondOfCodeception\Lib\SearchFacadeFactory
*/
protected $searchFacadeFactory;
protected SearchFacadeFactory $searchFacadeFactory;

/**
* @var \FondOfCodeception\Lib\TransferFacadeFactory
*/
protected $transferFacadeFactory;
protected TransferFacadeFactory $transferFacadeFactory;

/**
* @var \FondOfCodeception\Lib\PropelFacadeFactory
*/
protected $propelFacadeFactory;
protected PropelFacadeFactory $propelFacadeFactory;

/**
* @var \Psr\Log\LoggerInterface
* @var \Psr\Log\LoggerInterface|null
*/
protected $nullLogger;
protected ?LoggerInterface $nullLogger = null;

/**
* @param \Codeception\Lib\ModuleContainer $moduleContainer
Expand Down
5 changes: 3 additions & 2 deletions tests/FondOfCodeception/Module/SprykerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,20 @@

use Codeception\Lib\ModuleContainer;
use Codeception\Test\Unit;
use PHPUnit\Framework\MockObject\MockObject;
use Spryker\Shared\Config\Environment;

class SprykerTest extends Unit
{
/**
* @var \FondOfCodeception\Module\Spryker
*/
protected $spryker;
protected Spryker $spryker;

/**
* @var \Codeception\Lib\ModuleContainer|\PHPUnit\Framework\MockObject\MockObject
*/
protected $moduleContainerMock;
protected MockObject|ModuleContainer $moduleContainerMock;

/**
* @return void
Expand Down

0 comments on commit cab9644

Please sign in to comment.