From 290c1b907727e825d5f2441feeb7dc0dd301a751 Mon Sep 17 00:00:00 2001 From: Ruben Calvo Date: Mon, 5 Jan 2026 17:40:49 +0100 Subject: [PATCH] [ticket/17605] Fix vagrant in 3.3.x and and use svpernova09 homestead fork PHPBB-17605 --- .gitignore | 4 ++- phpBB/composer.json | 1 - phpBB/composer.lock | 57 +----------------------------- phpBB/docs/vagrant.md | 16 +++++---- Vagrantfile => vagrant/Vagrantfile | 14 ++++---- vagrant/after.sh | 2 +- vagrant/bootstrap.yaml | 4 +-- vagrant/composer.json | 5 +++ vagrant/phpbb-install-config.yml | 2 +- 9 files changed, 29 insertions(+), 76 deletions(-) rename Vagrantfile => vagrant/Vagrantfile (56%) create mode 100644 vagrant/composer.json diff --git a/.gitignore b/.gitignore index eda70c06051..e34d8db26a0 100644 --- a/.gitignore +++ b/.gitignore @@ -44,7 +44,9 @@ /tests/tmp/* /tests/vendor /vagrant/phpbb-install-config.yml -.vagrant +/vagrant/.vagrant +/vagrant/composer.lock +/vagrant/vendor node_modules # Excludes IDE / editors files diff --git a/phpBB/composer.json b/phpBB/composer.json index 42271c2da05..0c1a20278c5 100644 --- a/phpBB/composer.json +++ b/phpBB/composer.json @@ -58,7 +58,6 @@ "require-dev": { "fabpot/goutte": "~3.2", "php-webdriver/webdriver": "~1.8", - "laravel/homestead": "~7.0", "phing/phing": "~2.4", "phpunit/dbunit": "~4.0", "phpunit/phpunit": "^7.0", diff --git a/phpBB/composer.lock b/phpBB/composer.lock index ff18af9dd2d..d8266dd4d7a 100644 --- a/phpBB/composer.lock +++ b/phpBB/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "b63d9eb2d41744fe5532d47955802f7e", + "content-hash": "f0cffe69a7d759aef2ca92118e93a3c1", "packages": [ { "name": "bantu/ini-get-wrapper", @@ -2970,61 +2970,6 @@ "abandoned": "symfony/browser-kit", "time": "2018-06-29T15:13:57+00:00" }, - { - "name": "laravel/homestead", - "version": "v7.20.0", - "source": { - "type": "git", - "url": "https://github.com/laravel/homestead.git", - "reference": "cae38adcfdde1de1c4581e7a33872adaf9fbf926" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laravel/homestead/zipball/cae38adcfdde1de1c4581e7a33872adaf9fbf926", - "reference": "cae38adcfdde1de1c4581e7a33872adaf9fbf926", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0", - "symfony/console": "~3.3|~4.0", - "symfony/process": "~3.3|~4.0", - "symfony/yaml": "~3.3|~4.0" - }, - "require-dev": { - "phly/changelog-generator": "^2.2", - "phpunit/phpunit": "^5.7 || ^6.0" - }, - "bin": [ - "bin/homestead" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Laravel\\Homestead\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylorotwell@gmail.com" - } - ], - "description": "A virtual machine for web artisans.", - "support": { - "issues": "https://github.com/laravel/homestead/issues", - "source": "https://github.com/laravel/homestead/tree/master" - }, - "time": "2018-12-11T02:04:35+00:00" - }, { "name": "myclabs/deep-copy", "version": "1.12.0", diff --git a/phpBB/docs/vagrant.md b/phpBB/docs/vagrant.md index ac318270c1f..6c888ff7fd9 100644 --- a/phpBB/docs/vagrant.md +++ b/phpBB/docs/vagrant.md @@ -2,19 +2,21 @@ phpBB includes support for Vagrant. This allows developers and contributors to run phpBB without the need to set up their own local web server with traditional WAMP/MAMP stacks. It also provides a consistent environment between developers for writing and debugging code changes more productively. -phpBB uses the [Laravel/Homestead](https://laravel.com/docs/5.1/homestead) Vagrant box. It runs a Linux server with Ubuntu 14.04, PHP 5.6, Nginx, SQLite3, MySQL, and a whole lot more (complete specs below). +phpBB uses the [Laravel/Homestead](https://laravel.com/docs/5.1/homestead) Vagrant box. It runs a Linux server with Ubuntu, PHP 7.2, Apache, SQLite3, MySQL, and a whole lot more (complete specs below). ## Get Started * Download and Install [Vagrant](https://www.vagrantup.com/downloads.html) * Download and Install [VirtualBox](https://www.virtualbox.org/wiki/Downloads) -* Run `vagrant up` from the root of your cloned fork of the phpBB Git repository +* Run `vagrant up` from the `vagrant` directory of your cloned fork of the phpBB Git repository ```sh +$ cd vagrant +$ ../composer.phar install $ vagrant up ``` -* Access phpBB at `http://192.168.10.10/` +* Access phpBB at `http://192.168.56.56/` * Username: **admin** * Password: **adminadmin** @@ -52,7 +54,7 @@ By default, phpBB is pre-configured to install with a MySQL database. You can, h If you prefer to access phpBB from the more friendly URL `http://phpbb.app` then you must update your computer's hosts file. This file is typically located at `/etc/hosts` for Mac/Linux or `C:\Windows\System32\drivers\etc\hosts` for Windows. Open this file and add the following line to it, at the very bottom, and save. ``` -192.168.10.10 phpbb.app +192.168.56.56 phpbb.app ``` ## How it all works @@ -91,11 +93,11 @@ $ mysql -uhomestead -psecret phpbb < /home/vagrant/phpbb/phpBB/store/phpbb.sql ### Included Software -* Ubuntu 14.04 +* Ubuntu * Git -* PHP 5.6 +* PHP 7.2 * HHVM -* Nginx +* Apache * MySQL * Sqlite3 * Postgres diff --git a/Vagrantfile b/vagrant/Vagrantfile similarity index 56% rename from Vagrantfile rename to vagrant/Vagrantfile index ab225c9ad91..419c533335e 100644 --- a/Vagrantfile +++ b/vagrant/Vagrantfile @@ -2,24 +2,24 @@ require 'json' require 'yaml' VAGRANTFILE_API_VERSION ||= "2" -confDir = $confDir ||= File.expand_path("phpBB/vendor/laravel/homestead", File.dirname(__FILE__)) +confDir = $confDir ||= File.expand_path("vendor/svpernova09/homestead", File.dirname(__FILE__)) -homesteadYamlPath = "vagrant/bootstrap.yaml" -afterScriptPath = "vagrant/after.sh" -aliasesPath = "vagrant/aliases" +homesteadYamlPath = "bootstrap.yaml" +afterScriptPath = "after.sh" +aliasesPath = "aliases" require File.expand_path(confDir + '/scripts/homestead.rb') Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| - if File.exists? aliasesPath then + if File.exist? aliasesPath then config.vm.provision "file", source: aliasesPath, destination: "~/.bash_aliases" end - if File.exists? homesteadYamlPath then + if File.exist? homesteadYamlPath then Homestead.configure(config, YAML::load(File.read(homesteadYamlPath))) end - if File.exists? afterScriptPath then + if File.exist? afterScriptPath then config.vm.provision "shell", path: afterScriptPath end end diff --git a/vagrant/after.sh b/vagrant/after.sh index 5980e5c334a..d3bfccea6f5 100755 --- a/vagrant/after.sh +++ b/vagrant/after.sh @@ -34,4 +34,4 @@ sed -i "s/cgi.fix_pathinfo=.*/cgi.fix_pathinfo=1/" /etc/php/${PHP_VERSION}/fpm/p # Restart php-fpm to apply php.ini changes systemctl restart php${PHP_VERSION}-fpm.service -echo "Your board is ready at http://192.168.10.10/" +echo "Your board is ready at http://192.168.56.56/" diff --git a/vagrant/bootstrap.yaml b/vagrant/bootstrap.yaml index 02cf9086922..bb0b92b2521 100644 --- a/vagrant/bootstrap.yaml +++ b/vagrant/bootstrap.yaml @@ -1,5 +1,5 @@ --- -ip: "192.168.10.10" +ip: "192.168.56.56" memory: 2048 cpus: 1 hostname: phpbb @@ -12,7 +12,7 @@ keys: - ~/.ssh/id_rsa folders: - - map: "." + - map: ".." to: "/home/vagrant/phpbb" sites: - map: phpbb.app diff --git a/vagrant/composer.json b/vagrant/composer.json new file mode 100644 index 00000000000..c2cd51c5a54 --- /dev/null +++ b/vagrant/composer.json @@ -0,0 +1,5 @@ +{ + "require": { + "svpernova09/homestead": "dev-main" + } +} diff --git a/vagrant/phpbb-install-config.yml b/vagrant/phpbb-install-config.yml index 023d7b1a9d8..c9e49ee52df 100644 --- a/vagrant/phpbb-install-config.yml +++ b/vagrant/phpbb-install-config.yml @@ -46,6 +46,6 @@ installer: cookie_secure: false server_protocol: http:// force_server_vars: false - server_name: 192.168.10.10 + server_name: 192.168.56.56 server_port: 80 script_path: /