Skip to content

Commit

Permalink
Merge pull request #133 from DaveLiddament/feature/support-8.3
Browse files Browse the repository at this point in the history
Add support for PHP 8.3
  • Loading branch information
DaveLiddament authored Dec 10, 2023
2 parents afbb71a + 0010bbc commit 7c4c724
Show file tree
Hide file tree
Showing 6 changed files with 393 additions and 552 deletions.
1 change: 1 addition & 0 deletions .github/workflows/full-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
- "8.0"
- "8.1"
- "8.2"
- "8.3"
operating-system:
- "ubuntu-22.04"

Expand Down
67 changes: 39 additions & 28 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -1,31 +1,42 @@
Vagrant.configure(2) do |config|

config.vm.network :private_network, ip: "192.168.56.99"
config.vm.synced_folder ".", "/vagrant", type: "nfs", nfs_udp: false, mount_options: ["actimeo=2", "nolock"]

config.vm.hostname = "sarb"


config.vm.box = "debian/buster64"

config.ssh.forward_agent = true

config.vm.provider "virtualbox" do |vb|
vb.memory = "2048"
end

# Provision box with php and composer
config.vm.provision "shell", inline: <<-SHELL
apt-get update
apt-get install -y ca-certificates apt-transport-https git zip vim curl
wget -q https://packages.sury.org/php/apt.gpg -O- | apt-key add -
echo "deb https://packages.sury.org/php/ buster main" | tee /etc/apt/sources.list.d/php.list
apt-get update
apt-get install -y php7.4-cli php7.4-xml php7.4-mbstring php7.4-dev php7.4-curl
apt-get install -y php8.0-cli php8.0-xml php8.0-mbstring php8.0-dev php8.0-curl
apt-get install -y php8.1-cli php8.1-xml php8.1-mbstring php8.1-dev php8.1-curl
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
sudo -iu vagrant /usr/local/bin/composer --working-dir=/vagrant install
SHELL
Vagrant.configure("2") do |config|
config.vm.provider :virtualbox do |v|
v.name = "sarb"
v.customize [
"modifyvm", :id,
"--name", v.name,
"--memory", 2048,
"--natdnshostresolver1", "on",
"--cpus", 2,
]
end

config.vbguest.installer_options = { running_kernel_modules: ["vboxguest"] }

config.vm.hostname = "sarb"

config.vm.box = "debian/buster64"
config.vm.box_version = "~> 10.20220718.1"

config.vm.network :private_network, ip: "192.168.56.99"
config.ssh.forward_agent = true

config.vm.synced_folder ".", "/vagrant", type: "nfs", nfs_udp: false, mount_options: ["actimeo=2", "nolock"]


# Provision box with php and composer
config.vm.provision "shell", inline: <<-SHELL
apt-get update
apt-get install -y ca-certificates apt-transport-https git zip vim curl
wget -q https://packages.sury.org/php/apt.gpg -O- | apt-key add -
echo "deb https://packages.sury.org/php/ buster main" | tee /etc/apt/sources.list.d/php.list
apt-get update
apt-get install -y php8.0-cli php8.0-xml php8.0-mbstring php8.0-dev php8.0-curl
apt-get install -y php8.1-cli php8.1-xml php8.1-mbstring php8.1-dev php8.1-curl
apt-get install -y php8.2-cli php8.2-xml php8.2-mbstring php8.2-dev php8.2-curl
apt-get install -y php8.3-cli php8.3-xml php8.3-mbstring php8.3-dev php8.3-curl
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
sudo -iu vagrant /usr/local/bin/composer --working-dir=/vagrant install
SHELL
end

40 changes: 25 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,26 @@
"sort-packages": true
},
"require": {
"php": ">=8.0 <8.3",
"symfony/config": "^5.4 || ^6.0",
"symfony/console": "^5.4 || ^6.0",
"symfony/dependency-injection": "^5.4 || ^6.0",
"symfony/process": "^5.4 || ^6.0",
"symfony/yaml": "^5.4 || ^6.0",
"webmozart/assert": "^1.3"
"php": ">=8.0 <8.4",
"symfony/config": "^5.4 || ^6.0.19",
"symfony/console": "^5.4 || ^6.0.19",
"symfony/dependency-injection": "^5.4 || ^6.0.20",
"symfony/process": "^5.4 || ^6.0.19",
"symfony/yaml": "^5.4 || ^6.0.19",
"webmozart/assert": "^1.11"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^v3.17.0",
"friendsofphp/php-cs-fixer": "^v3.41.1",
"php-parallel-lint/php-parallel-lint": "~1.2.0",
"php-parallel-lint/php-var-dump-check": "^v0.5",
"phpstan/phpstan": "^1.10.19",
"phpstan/phpstan-phpunit": "^1.3.13",
"phpstan/phpstan-strict-rules": "^1.5.1",
"phpstan/phpstan": "^1.10.48",
"phpstan/phpstan-phpunit": "^1.3.15",
"phpstan/phpstan-strict-rules": "^1.5.2",
"phpstan/phpstan-webmozart-assert": "^1.2.4",
"phpunit/phpunit": "^9.6.9",
"psalm/plugin-phpunit": "^0.15.1",
"symfony/filesystem": "^5.4 || ^6.0",
"vimeo/psalm": "^4.30"
"phpunit/phpunit": "^9.6.15",
"psalm/plugin-phpunit": "^0.18.4",
"symfony/filesystem": "^5.4 || ^6.0.19",
"vimeo/psalm": "^5.17.0"
},
"bin" : ["sarb"],
"autoload": {
Expand Down Expand Up @@ -75,6 +75,15 @@
"@phpstan",
"@psalm-8.2"
],
"ci-8.3" : [
"@composer-validate",
"@lint",
"@var-dump-checker",
"@cs",
"@test",
"@phpstan",
"@psalm-8.3"
],
"composer-validate" : "@composer validate --no-check-all --strict",
"lint" : "parallel-lint src tests",
"var-dump-checker" : "var-dump-check --ladybug --no-colors src",
Expand All @@ -83,6 +92,7 @@
"psalm-8.0" : "psalm --php-version=8.0",
"psalm-8.1" : "psalm --php-version=8.1",
"psalm-8.2" : "psalm --php-version=8.2 --shepherd",
"psalm-8.3" : "psalm --php-version=8.3 --shepherd",
"phpstan" : "phpstan -n --no-progress analyse",
"deptrac" : "deptrac",
"test" : [
Expand Down
Loading

0 comments on commit 7c4c724

Please sign in to comment.