Skip to content

Commit

Permalink
Merge pull request #292 from openeuropa/OEL-2115
Browse files Browse the repository at this point in the history
OEL-2115: Update to PHP 8.1
  • Loading branch information
brummbar committed Feb 15, 2023
2 parents af68c99 + 4b1fb77 commit e8cc08e
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 22 deletions.
6 changes: 3 additions & 3 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ pipeline:
event: tag
matrix:
COMPOSER_BOUNDARY: highest
PHP_VERSION: 7.4
PHP_VERSION: 8.0

github-release:
image: registry.fpfis.eu/drone-plugins/github-release
Expand All @@ -109,12 +109,12 @@ pipeline:
event: tag
matrix:
COMPOSER_BOUNDARY: highest
PHP_VERSION: 7.4
PHP_VERSION: 8.0

matrix:
COMPOSER_BOUNDARY:
- lowest
- highest
PHP_VERSION:
- 7.4
- 8.0
- 8.1
39 changes: 26 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,39 @@
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": ">=7.4",
"php": ">=8.0",
"cweagans/composer-patches": "^1.7",
"drupal/core": "^9.3",
"drupal/ui_patterns": "^1.2",
"drupal/core": "^9.4",
"drupal/ui_patterns": "^1.4",
"drupal/ui_patterns_settings": "^1.1",
"openeuropa/ecl-twig-loader": "^3.1"
},
"require-dev": {
"ext-dom": "*",
"composer/installers": "^1.11",
"drupal/config_devel": "~1.8",
"drupal/core-composer-scaffold": "^9.3",
"drupal/core-dev": "^9.3",
"drupal/drupal-extension": "^4.1",
"drupal/core-composer-scaffold": "^9.4",
"drupal/drupal-extension": "^5.0.0alpha1",
"drupal/styleguide": "^1.0@beta",
"drupal/token": "^1.10",
"drush/drush": "^10.3",
"easyrdf/easyrdf": "1.0.0 as 0.9.2",
"drush/drush": "^11.1",
"guzzlehttp/guzzle": "^7.0",
"masterminds/html5": "^2.7.6",
"mikey179/vfsstream": "^1.6.10",
"nikic/php-parser": "^4.13",
"openeuropa/code-review": "^2.0",
"openeuropa/task-runner-drupal-project-symlink": "^1.0-beta5",
"phpspec/prophecy-phpunit": "^1 || ^2",
"symfony/dom-crawler": "^4.4.12"
"openeuropa/task-runner-drupal-project-symlink": "^1.0-beta6",
"phpspec/prophecy-phpunit": "^2",
"symfony/console": "^4.4.30",
"symfony/css-selector": "^4.4.30",
"symfony/dom-crawler": "^4.4.44",
"symfony/finder": "^4.4.30",
"symfony/http-client": "^4.4.30",
"symfony/http-foundation": "^4.4.30",
"symfony/phpunit-bridge": "^6.0",
"symfony/routing": "^4.4.30",
"symfony/validator": "^4.4.30",
"symfony/yaml": "^4.4.29"
},
"scripts": {
"post-install-cmd": "./vendor/bin/run drupal:site-setup",
Expand Down Expand Up @@ -65,8 +75,11 @@
}
},
"_readme": [
"Explicit minimum version requirement for symfony/dom-crawler due to its lower versions using the deprecated function libxml_disable_entity_loader() in PHP8.",
"Explicit requirement of token module due to PHP 8 compatbility."
"Explicit requirement of token module due to PHP 8 compatbility.",
"Explicit minimum version requirement of guzzlehttp/guzzle due to lower versions missing return type on CookieJar::getIterator() and CookieJar::count() methods.",
"Explicit minimum version requirement of masterminds/html5 due to lower versions passing NULL parameters instead of string when calling DOMImplementation::createDocument() method.",
"Explicit minimum version requirement of mikey179/vfsstream due to lower versions missing return type on vfsStreamDirectory::getIterator() method.",
"Explicit minimum version requirement of symfony packages due to lower versions missing return type on various methods being incompatible with PHP 8.1 parent methods."
]
},
"config": {
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '2'
services:
web:
image: fpfis/httpd-php-dev:8.0
image: fpfis/httpd-php-dev:8.1
working_dir: /var/www/html
ports:
- 8080:8080
Expand Down
10 changes: 5 additions & 5 deletions src/ValueObject/ValueObjectBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,35 +19,35 @@ abstract class ValueObjectBase implements ValueObjectInterface {
/**
* {@inheritdoc}
*/
public function offsetExists($offset) {
public function offsetExists($offset): bool {
return array_key_exists($offset, $this->getArray());
}

/**
* {@inheritdoc}
*/
public function getIterator() {
public function getIterator(): \Traversable {
return new \ArrayIterator($this->getArray());
}

/**
* {@inheritdoc}
*/
public function offsetGet($offset) {
public function offsetGet($offset): mixed {
return $this->getArray()[$offset];
}

/**
* {@inheritdoc}
*/
public function offsetSet($offset, $value) {
public function offsetSet($offset, $value): void {
// Does nothing as a value object array access is meant to be read-only.
}

/**
* {@inheritdoc}
*/
public function offsetUnset($offset) {
public function offsetUnset($offset): void {
// Does nothing as a value object array access is meant to be read-only.
}

Expand Down

0 comments on commit e8cc08e

Please sign in to comment.