diff --git a/.env.example b/.env.example index 992ef5529a..a869521a1f 100644 --- a/.env.example +++ b/.env.example @@ -2,6 +2,10 @@ DB_NAME=database_name DB_USER=database_user DB_PASSWORD=database_password +# Optionally, you can use a data source name (DSN) +# When using a DSN, you can remove the DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST variables +# DATABASE_URL=mysql://database_user:database_password@database_host:database_port/database_name + # Optional variables # DB_HOST=localhost # DB_PREFIX=wp_ diff --git a/.gitattributes b/.gitattributes index 28b341dd84..eb26160964 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,4 +2,5 @@ /.gitattributes export-ignore /.editorconfig export-ignore /.travis.yml export-ignore +/dependencies.yml export-ignore /phpcs.xml export-ignore diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md deleted file mode 100644 index 5867feed23..0000000000 --- a/.github/CONTRIBUTING.md +++ /dev/null @@ -1 +0,0 @@ -Please read [Contributing to Roots Projects](https://github.com/roots/guidelines/blob/master/CONTRIBUTING.md) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index cb8d064c29..0000000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,62 +0,0 @@ -## Submit a feature request or bug report - -- [ ] I've read the [guidelines for Contributing to Roots Projects](https://github.com/roots/guidelines/blob/master/CONTRIBUTING.md) -- [ ] This is a feature request -- [ ] This is a bug report -- [ ] This request isn't a duplicate of an [existing issue](https://github.com/roots/bedrock/issues) -- [ ] I've read the [docs](https://roots.io/bedrock/docs) and followed them (if applicable) - -Replace any `X` with your information. - ---- - -**What is the current behavior?** - -X - - -**What is the expected or desired behavior?** - -X - ---- - -## Bug report - -(delete this section if not applicable) - -**Please provide steps to reproduce, including full log output:** - -X - -**Please describe your local environment:** - -Bedrock version: X - -WordPress version: X - -PHP version: - -OS: - -**Where did the bug happen? Development or remote servers?** - -X - -**Is there a related [Discourse](https://discourse.roots.io/c/bedrock) thread or were any utilized (please link them)?** - -X - ---- - -## Feature Request - -(delete this section if not applicable) - -**Please provide use cases for changing the current behavior:** - -X - -**Other relevant information:** - -X diff --git a/.gitignore b/.gitignore index 9a16da0a80..023d179645 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,6 @@ Gruntfile.js # Composer /vendor + +# WP-CLI +wp-cli.local.yml diff --git a/.travis.yml b/.travis.yml index c218c71c3a..86609fdeeb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,9 @@ sudo: false language: php php: + - 7.3 - 7.2 - 7.1 - - 7.0 - - 5.6 - nightly matrix: diff --git a/CHANGELOG.md b/CHANGELOG.md index d2a3294d26..cbcbd6cdf6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,42 @@ +### 1.12.3: 2019-03-13 + +* Update to WordPress 5.1.1 ([#426](https://github.com/roots/bedrock/pull/426)) + +### 1.12.2: 2019-02-21 + +* Update to WordPress 5.1 ([#420](https://github.com/roots/bedrock/pull/420)) + +### 1.12.1: 2019-02-14 + +* Update `vlucas/phpdotenv` ([#417](https://github.com/roots/bedrock/pull/417)) +* Make DSN implementation more uniform ([#415](https://github.com/roots/bedrock/pull/415)) + +### 1.12.0: 2019-02-07 + +* Support database DSN ([#414](https://github.com/roots/bedrock/pull/414)) +* Detect HTTPS if WordPress is behind a reverse proxy ([#413](https://github.com/roots/bedrock/pull/413)) +* Update `vlucas/phpdotenv` to `^3` ([#412](https://github.com/roots/bedrock/pull/412)) + +### 1.11.1: 2019-01-09 + +* Update to WordPress 5.0.3 ([#408](https://github.com/roots/bedrock/pull/408)) + +### 1.11.0: 2018-12-19 + +* Bump PHP requirement to >= 7.1 ([#405](https://github.com/roots/bedrock/pull/405)) + +### 1.10.2: 2018-12-19 + +* Update to WordPress 5.0.2 ([#406](https://github.com/roots/bedrock/pull/406)) + +### 1.10.1: 2018-12-12 + +* Update to WordPress 5.0.1 ([#403](https://github.com/roots/bedrock/pull/403)) + +### 1.10.0: 2018-12-09 + +* Update to WordPress 5.0, switch from `johnpbloch/wordpress` to `roots/wordpress` package ([#395](https://github.com/roots/bedrock/pull/395)) + ### 1.9.0: 2018-09-17 * Fix error display in development environments ([c457082](https://github.com/roots/bedrock/commit/c457082cf4b153400d3e34f4f68a30eea4cc7c38)) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md deleted file mode 100644 index f663c4792c..0000000000 --- a/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,74 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as -contributors and maintainers pledge to making participation in our project and -our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, gender identity and expression, level of experience, -nationality, personal appearance, race, religion, or sexual identity and -orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment -include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or - advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic - address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable -behavior and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or -reject comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct, or to ban temporarily or -permanently any contributor for other behaviors that they deem inappropriate, -threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. Examples of -representing a project or community include using an official project e-mail -address, posting via an official social media account, or acting as an appointed -representative at an online or offline event. Representation of a project may be -further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team at team@roots.io. All -complaints will be reviewed and investigated and will result in a response that -is deemed necessary and appropriate to the circumstances. The project team is -obligated to maintain confidentiality with regard to the reporter of an incident. -Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good -faith may face temporary or permanent repercussions as determined by other -members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, -available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html - -[homepage]: https://www.contributor-covenant.org - diff --git a/README.md b/README.md index 8140c9069f..667b22e7c3 100644 --- a/README.md +++ b/README.md @@ -76,65 +76,39 @@ Much of the philosophy behind Bedrock is inspired by the [Twelve-Factor App](htt ## Features * Better folder structure -* Dependency management with [Composer](http://getcomposer.org) +* Dependency management with [Composer](https://getcomposer.org) * Easy WordPress configuration with environment specific files * Environment variables with [Dotenv](https://github.com/vlucas/phpdotenv) * Autoloader for mu-plugins (use regular plugins as mu-plugins) * Enhanced security (separated web root and secure passwords with [wp-password-bcrypt](https://github.com/roots/wp-password-bcrypt)) -Use [Trellis](https://github.com/roots/trellis) for additional features: - -* Easy development environments with [Vagrant](http://www.vagrantup.com/) -* Easy server provisioning with [Ansible](http://www.ansible.com/) (Ubuntu 16.04, PHP 7.1, MariaDB) -* One-command deploys - -See a complete working example in the [roots-example-project.com repo](https://github.com/roots/roots-example-project.com). - ## Requirements -* PHP >= 5.6 +* PHP >= 7.1 * Composer - [Install](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx) ## Installation -1. Create a new project in a new folder for your project: - - `composer create-project roots/bedrock your-project-folder-name` - -2. Update environment variables in `.env` file: - * `DB_NAME` - Database name - * `DB_USER` - Database user - * `DB_PASSWORD` - Database password - * `DB_HOST` - Database host +1. Create a new project: + ```sh + $ composer create-project roots/bedrock + ``` +2. Update environment variables in the `.env` file: + * Database variables + * `DB_NAME` - Database name + * `DB_USER` - Database user + * `DB_PASSWORD` - Database password + * `DB_HOST` - Database host + * Optionally, you can define `DATABASE_URL` for using a DSN instead of using the variables above (e.g. `mysql://user:password@127.0.0.1:3306/db_name`) * `WP_ENV` - Set to environment (`development`, `staging`, `production`) - * `WP_HOME` - Full URL to WordPress home (http://example.com) - * `WP_SITEURL` - Full URL to WordPress including subdirectory (http://example.com/wp) + * `WP_HOME` - Full URL to WordPress home (https://example.com) + * `WP_SITEURL` - Full URL to WordPress including subdirectory (https://example.com/wp) * `AUTH_KEY`, `SECURE_AUTH_KEY`, `LOGGED_IN_KEY`, `NONCE_KEY`, `AUTH_SALT`, `SECURE_AUTH_SALT`, `LOGGED_IN_SALT`, `NONCE_SALT` - - If you want to automatically generate the security keys (assuming you have wp-cli installed locally) you can use the very handy [wp-cli-dotenv-command][wp-cli-dotenv]: - - wp package install aaemnnosttv/wp-cli-dotenv-command - - wp dotenv salts regenerate - - Or, you can cut and paste from the [Roots WordPress Salt Generator][roots-wp-salt]. - -3. Add theme(s) in `web/app/themes` as you would for a normal WordPress site. - -4. Set your site vhost document root to `/path/to/site/web/` (`/path/to/site/current/web/` if using deploys) - -5. Access WP admin at `http://example.com/wp/wp-admin` - -## Deploys - -There are two methods to deploy Bedrock sites out of the box: - -* [Trellis](https://github.com/roots/trellis) -* [bedrock-capistrano](https://github.com/roots/bedrock-capistrano) - -Any other deployment method can be used as well with one requirement: - -`composer install` must be run as part of the deploy process. + * Generate with [wp-cli-dotenv-command](https://github.com/aaemnnosttv/wp-cli-dotenv-command) + * Generate with [our WordPress salts generator](https://roots.io/salts.html) +3. Add theme(s) in `web/app/themes/` as you would for a normal WordPress site +4. Set the document root on your webserver to Bedrock's `web` folder: `/path/to/site/web/` +5. Access WordPress admin at `https://example.com/wp/wp-admin/` ## Documentation @@ -144,6 +118,12 @@ Bedrock documentation is available at [https://roots.io/bedrock/docs/](https://r Contributions are welcome from everyone. We have [contributing guidelines](https://github.com/roots/guidelines/blob/master/CONTRIBUTING.md) to help you get started. +## Bedrock sponsors + +Help support our open-source development efforts by [becoming a patron](https://www.patreon.com/rootsdev). + +Kinsta KM Digital itineris + ## Community Keep track of development and community news. @@ -153,6 +133,3 @@ Keep track of development and community news. * Read and subscribe to the [Roots Blog](https://roots.io/blog/) * Subscribe to the [Roots Newsletter](https://roots.io/subscribe/) * Listen to the [Roots Radio podcast](https://roots.io/podcast/) - -[roots-wp-salt]:https://roots.io/salts.html -[wp-cli-dotenv]:https://github.com/aaemnnosttv/wp-cli-dotenv-command diff --git a/composer.json b/composer.json index bef8d27e62..92124c2ace 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ } ], "keywords": [ - "bedrock", "roots", "wordpress", "stack", "composer", "vagrant", "wp" + "bedrock", "composer", "roots", "wordpress", "wp", "wp-config" ], "support": { "issues": "https://github.com/roots/bedrock/issues", @@ -33,13 +33,13 @@ } ], "require": { - "php": ">=5.6", + "php": ">=7.1", "composer/installers": "^1.4", - "vlucas/phpdotenv": "^2.0.1", - "johnpbloch/wordpress": "4.9.8", + "vlucas/phpdotenv": "^3.0.0", "oscarotero/env": "^1.1.0", - "roots/wp-password-bcrypt": "1.0.0", - "roots/wp-config": "1.0.0" + "roots/wordpress": "5.1.1", + "roots/wp-config": "1.0.0", + "roots/wp-password-bcrypt": "1.0.0" }, "require-dev": { "squizlabs/php_codesniffer": "^3.0.2", diff --git a/composer.lock b/composer.lock index 5a2ba15788..1880573cac 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "01a9da7555b27b63a86fafda2eba0f15", + "content-hash": "b15c5b4439fe8f0147b9ff3a022945a1", "packages": [ { "name": "composer/installers", - "version": "v1.5.0", + "version": "v1.6.0", "source": { "type": "git", "url": "https://github.com/composer/installers.git", - "reference": "049797d727261bf27f2690430d935067710049c2" + "reference": "cfcca6b1b60bc4974324efb5783c13dca6932b5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/installers/zipball/049797d727261bf27f2690430d935067710049c2", - "reference": "049797d727261bf27f2690430d935067710049c2", + "url": "https://api.github.com/repos/composer/installers/zipball/cfcca6b1b60bc4974324efb5783c13dca6932b5b", + "reference": "cfcca6b1b60bc4974324efb5783c13dca6932b5b", "shasum": "" }, "require": { @@ -124,66 +124,116 @@ "zend", "zikula" ], - "time": "2017-12-29T09:13:20+00:00" + "time": "2018-08-27T06:10:37+00:00" }, { - "name": "johnpbloch/wordpress", - "version": "4.9.8", + "name": "oscarotero/env", + "version": "v1.1.0", "source": { "type": "git", - "url": "https://github.com/johnpbloch/wordpress.git", - "reference": "de02cd79a41e06f36558040724414197cb7f6246" + "url": "https://github.com/oscarotero/env.git", + "reference": "0f676e41d758fa984806c32e27f0cf7afa63d8db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/johnpbloch/wordpress/zipball/de02cd79a41e06f36558040724414197cb7f6246", - "reference": "de02cd79a41e06f36558040724414197cb7f6246", + "url": "https://api.github.com/repos/oscarotero/env/zipball/0f676e41d758fa984806c32e27f0cf7afa63d8db", + "reference": "0f676e41d758fa984806c32e27f0cf7afa63d8db", "shasum": "" }, "require": { - "johnpbloch/wordpress-core": "4.9.8", - "johnpbloch/wordpress-core-installer": "^1.0", - "php": ">=5.3.2" + "php": ">=5.2" + }, + "type": "library", + "autoload": { + "psr-0": { + "Env": "src/" + } }, - "type": "package", "notification-url": "https://packagist.org/downloads/", "license": [ - "GPL-2.0+" + "MIT" ], "authors": [ { - "name": "WordPress Community", - "homepage": "http://wordpress.org/about/" + "name": "Oscar Otero", + "email": "oom@oscarotero.com", + "homepage": "http://oscarotero.com", + "role": "Developer" } ], - "description": "WordPress is web software you can use to create a beautiful website or blog.", - "homepage": "http://wordpress.org/", + "description": "Simple library to consume environment variables", + "homepage": "https://github.com/oscarotero/env", "keywords": [ - "blog", - "cms", - "wordpress" + "env" ], - "time": "2018-08-02T21:48:39+00:00" + "time": "2017-07-17T20:41:59+00:00" }, { - "name": "johnpbloch/wordpress-core", - "version": "4.9.8", + "name": "phpoption/phpoption", + "version": "1.5.0", "source": { "type": "git", - "url": "https://github.com/johnpbloch/wordpress-core.git", - "reference": "50323f9b91d7689d615b4af02caf9d80584b1cfc" + "url": "https://github.com/schmittjoh/php-option.git", + "reference": "94e644f7d2051a5f0fcf77d81605f152eecff0ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/johnpbloch/wordpress-core/zipball/50323f9b91d7689d615b4af02caf9d80584b1cfc", - "reference": "50323f9b91d7689d615b4af02caf9d80584b1cfc", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/94e644f7d2051a5f0fcf77d81605f152eecff0ed", + "reference": "94e644f7d2051a5f0fcf77d81605f152eecff0ed", "shasum": "" }, "require": { - "php": ">=5.3.2" + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "4.7.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "psr-0": { + "PhpOption\\": "src/" + } }, - "provide": { - "wordpress/core-implementation": "4.9.8" + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache2" + ], + "authors": [ + { + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Option Type for PHP", + "keywords": [ + "language", + "option", + "php", + "type" + ], + "time": "2015-07-25T16:39:46+00:00" + }, + { + "name": "roots/wordpress", + "version": "5.1.1", + "source": { + "type": "git", + "url": "https://github.com/WordPress/WordPress.git", + "reference": "5.1.1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/WordPress/WordPress/zipball/5.1.1", + "reference": "5.1.1" + }, + "require": { + "php": ">=5.3.2", + "roots/wordpress-core-installer": ">=1.0.0" }, "type": "wordpress-core", "notification-url": "https://packagist.org/downloads/", @@ -193,30 +243,30 @@ "authors": [ { "name": "WordPress Community", - "homepage": "http://wordpress.org/about/" + "homepage": "https://wordpress.org/about/" } ], "description": "WordPress is web software you can use to create a beautiful website or blog.", - "homepage": "http://wordpress.org/", + "homepage": "https://wordpress.org/", "keywords": [ "blog", "cms", "wordpress" ], - "time": "2018-08-02T21:48:32+00:00" + "time": "2019-03-13T14:18:06+00:00" }, { - "name": "johnpbloch/wordpress-core-installer", - "version": "1.0.0.2", + "name": "roots/wordpress-core-installer", + "version": "1.1.0", "source": { "type": "git", - "url": "https://github.com/johnpbloch/wordpress-core-installer.git", - "reference": "7941acd71725710a789daabe0557429da63e7ac6" + "url": "https://github.com/roots/wordpress-core-installer.git", + "reference": "83744b1ba5bbdb5bb225f47e24da61a6cf6c5b80" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/johnpbloch/wordpress-core-installer/zipball/7941acd71725710a789daabe0557429da63e7ac6", - "reference": "7941acd71725710a789daabe0557429da63e7ac6", + "url": "https://api.github.com/repos/roots/wordpress-core-installer/zipball/83744b1ba5bbdb5bb225f47e24da61a6cf6c5b80", + "reference": "83744b1ba5bbdb5bb225f47e24da61a6cf6c5b80", "shasum": "" }, "require": { @@ -225,76 +275,41 @@ "conflict": { "composer/installers": "<1.0.6" }, + "replace": { + "johnpbloch/wordpress-core-installer": "*" + }, "require-dev": { "composer/composer": "^1.0", "phpunit/phpunit": ">=4.8.35" }, "type": "composer-plugin", "extra": { - "class": "johnpbloch\\Composer\\WordPressCorePlugin" + "class": "Roots\\Composer\\WordPressCorePlugin" }, "autoload": { - "psr-0": { - "johnpbloch\\Composer\\": "src/" + "psr-4": { + "Roots\\Composer\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "GPL-2.0+" + "GPL-2.0-or-later" ], "authors": [ { "name": "John P. Bloch", "email": "me@johnpbloch.com" + }, + { + "name": "Roots", + "email": "team@roots.io" } ], "description": "A custom installer to handle deploying WordPress with composer", "keywords": [ "wordpress" ], - "time": "2018-01-29T14:49:29+00:00" - }, - { - "name": "oscarotero/env", - "version": "v1.1.0", - "source": { - "type": "git", - "url": "https://github.com/oscarotero/env.git", - "reference": "0f676e41d758fa984806c32e27f0cf7afa63d8db" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/oscarotero/env/zipball/0f676e41d758fa984806c32e27f0cf7afa63d8db", - "reference": "0f676e41d758fa984806c32e27f0cf7afa63d8db", - "shasum": "" - }, - "require": { - "php": ">=5.2" - }, - "type": "library", - "autoload": { - "psr-0": { - "Env": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Oscar Otero", - "email": "oom@oscarotero.com", - "homepage": "http://oscarotero.com", - "role": "Developer" - } - ], - "description": "Simple library to consume environment variables", - "homepage": "https://github.com/oscarotero/env", - "keywords": [ - "env" - ], - "time": "2017-07-17T20:41:59+00:00" + "time": "2018-12-10T00:22:15+00:00" }, { "name": "roots/wp-config", @@ -395,30 +410,90 @@ ], "time": "2016-03-01T16:27:06+00:00" }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.10.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "e3d826245268269cd66f8326bd8bc066687b4a19" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19", + "reference": "e3d826245268269cd66f8326bd8bc066687b4a19", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + }, + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "time": "2018-08-06T14:22:27+00:00" + }, { "name": "vlucas/phpdotenv", - "version": "v2.5.1", + "version": "v3.3.2", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "8abb4f9aa89ddea9d52112c65bbe8d0125e2fa8e" + "reference": "1ee9369cfbf26cfcf1f2515d98f15fab54e9647a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/8abb4f9aa89ddea9d52112c65bbe8d0125e2fa8e", - "reference": "8abb4f9aa89ddea9d52112c65bbe8d0125e2fa8e", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/1ee9369cfbf26cfcf1f2515d98f15fab54e9647a", + "reference": "1ee9369cfbf26cfcf1f2515d98f15fab54e9647a", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": "^5.4 || ^7.0", + "phpoption/phpoption": "^1.5", + "symfony/polyfill-ctype": "^1.9" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.0" + "phpunit/phpunit": "^4.8.35 || ^5.0 || ^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -443,20 +518,34 @@ "env", "environment" ], - "time": "2018-07-29T20:33:41+00:00" + "time": "2019-01-30T10:43:17+00:00" } ], "packages-dev": [ { "name": "roave/security-advisories", "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/Roave/SecurityAdvisories.git", + "reference": "54ee79a17e8cdc4ff8a1570198d5bc669a5803b8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/54ee79a17e8cdc4ff8a1570198d5bc669a5803b8", + "reference": "54ee79a17e8cdc4ff8a1570198d5bc669a5803b8", + "shasum": "" + }, "conflict": { "3f/pygmentize": "<1.2", "adodb/adodb-php": "<5.20.12", + "alterphp/easyadmin-extension-bundle": ">=1.2,<1.2.11|>=1.3,<1.3.1", "amphp/artax": "<1.0.6|>=2,<2.0.6", "amphp/http": "<1.0.1", + "api-platform/core": ">=2.2,<2.2.10|>=2.3,<2.3.6", "asymmetricrypt/asymmetricrypt": ">=0,<9.9.99", "aws/aws-sdk-php": ">=3,<3.2.1", + "brightlocal/phpwhois": "<=4.2.5", "bugsnag/bugsnag-laravel": ">=2,<2.0.2", "cakephp/cakephp": ">=1.3,<1.3.18|>=2,<2.4.99|>=2.5,<2.5.99|>=2.6,<2.6.12|>=2.7,<2.7.6|>=3,<3.0.15|>=3.1,<3.1.4|>=3.4,<3.4.14|>=3.5,<3.5.17|>=3.6,<3.6.4", "cart2quote/module-quotation": ">=4.1.6,<=4.4.5|>=5,<5.4.4", @@ -468,6 +557,7 @@ "contao/core-bundle": ">=4,<4.4.18|>=4.5,<4.5.8", "contao/listing-bundle": ">=4,<4.4.8", "contao/newsletter-bundle": ">=4,<4.1", + "david-garcia/phpwhois": "<=4.3.1", "doctrine/annotations": ">=1,<1.2.7", "doctrine/cache": ">=1,<1.3.2|>=1.4,<1.4.2", "doctrine/common": ">=2,<2.4.3|>=2.5,<2.5.1", @@ -478,11 +568,16 @@ "doctrine/mongodb-odm-bundle": ">=2,<3.0.1", "doctrine/orm": ">=2,<2.4.8|>=2.5,<2.5.1", "dompdf/dompdf": ">=0.6,<0.6.2", - "drupal/core": ">=7,<7.59|>=8,<8.4.8|>=8.5,<8.5.3", - "drupal/drupal": ">=7,<7.59|>=8,<8.4.8|>=8.5,<8.5.3", + "drupal/core": ">=7,<7.62|>=8,<8.5.9|>=8.6,<8.6.6", + "drupal/drupal": ">=7,<7.62|>=8,<8.5.9|>=8.6,<8.6.6", "erusev/parsedown": "<1.7", - "ezsystems/ezpublish-legacy": ">=5.3,<5.3.12.3|>=5.4,<5.4.11.3|>=2017.8,<2017.8.1.1|>=2017.12,<2017.12.2.1", + "ezsystems/ezpublish-kernel": ">=5.3,<5.3.12.1|>=5.4,<5.4.13.1|>=6,<6.7.9.1|>=6.8,<6.13.5.1|>=7,<7.2.4.1|>=7.3,<7.3.2.1", + "ezsystems/ezpublish-legacy": ">=5.3,<5.3.12.6|>=5.4,<5.4.12.3|>=2011,<2017.12.4.3|>=2018.6,<2018.6.1.4|>=2018.9,<2018.9.1.3", + "ezsystems/repository-forms": ">=2.3,<2.3.2.1", + "ezyang/htmlpurifier": "<4.1.1", "firebase/php-jwt": "<2", + "fooman/tcpdf": "<6.2.22", + "fossar/tcpdf-parser": "<6.2.22", "friendsofsymfony/rest-bundle": ">=1.2,<1.2.2", "friendsofsymfony/user-bundle": ">=1.2,<1.3.5", "fuel/core": "<1.8.1", @@ -490,74 +585,98 @@ "gregwar/rst": "<1.0.3", "guzzlehttp/guzzle": ">=6,<6.2.1|>=4.0.0-rc2,<4.2.4|>=5,<5.3.1", "illuminate/auth": ">=4,<4.0.99|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.10", + "illuminate/cookie": ">=4,<=4.0.11|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.42|>=5.6,<5.6.30", "illuminate/database": ">=4,<4.0.99|>=4.1,<4.1.29", "illuminate/encryption": ">=4,<=4.0.11|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.40|>=5.6,<5.6.15", + "ivankristianto/phpwhois": "<=4.3", + "james-heinrich/getid3": "<1.9.9", "joomla/session": "<1.3.1", + "jsmitty12/phpwhois": "<5.1", + "kazist/phpwhois": "<=4.2.6", "kreait/firebase-php": ">=3.2,<3.8.1", - "laravel/framework": ">=4,<4.0.99|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.40|>=5.6,<5.6.15", + "la-haute-societe/tcpdf": "<6.2.22", + "laravel/framework": ">=4,<4.0.99|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.42|>=5.6,<5.6.30", "laravel/socialite": ">=1,<1.0.99|>=2,<2.0.10", - "magento/magento1ce": "<1.9.3.9", - "magento/magento1ee": ">=1.9,<1.14.3.2", - "magento/product-community-edition": ">=2,<2.2.5", + "league/commonmark": ">=0.15.6,<0.18.1", + "magento/magento1ce": "<1.9.4", + "magento/magento1ee": ">=1.9,<1.14.4", + "magento/product-community-edition": ">=2,<2.2.7", "monolog/monolog": ">=1.8,<1.12", "namshi/jose": "<2.2", "onelogin/php-saml": "<2.10.4", + "openid/php-openid": "<2.3", "oro/crm": ">=1.7,<1.7.4", "oro/platform": ">=1.7,<1.7.4", "padraic/humbug_get_contents": "<1.1.2", "pagarme/pagarme-php": ">=0,<3", "paragonie/random_compat": "<2", "paypal/merchant-sdk-php": "<3.12", - "phpmailer/phpmailer": ">=5,<5.2.24", + "pear/archive_tar": "<1.4.4", + "phpmailer/phpmailer": ">=5,<5.2.27|>=6,<6.0.6", + "phpoffice/phpexcel": "<=1.8.1", + "phpoffice/phpspreadsheet": "<=1.5", "phpunit/phpunit": ">=4.8.19,<4.8.28|>=5.0.10,<5.6.3", + "phpwhois/phpwhois": "<=4.2.5", "phpxmlrpc/extras": "<0.6.1", "propel/propel": ">=2.0.0-alpha1,<=2.0.0-alpha7", "propel/propel1": ">=1,<=1.7.1", "pusher/pusher-php-server": "<2.2.1", + "robrichards/xmlseclibs": ">=1,<3.0.2", "sabre/dav": ">=1.6,<1.6.99|>=1.7,<1.7.11|>=1.8,<1.8.9", "sensiolabs/connect": "<4.2.3", + "serluck/phpwhois": "<=4.2.6", "shopware/shopware": "<5.3.7", "silverstripe/cms": ">=3,<=3.0.11|>=3.1,<3.1.11", "silverstripe/forum": "<=0.6.1|>=0.7,<=0.7.3", "silverstripe/framework": ">=3,<3.3", "silverstripe/userforms": "<3", + "simple-updates/phpwhois": "<=1", "simplesamlphp/saml2": "<1.10.6|>=2,<2.3.8|>=3,<3.1.4", - "simplesamlphp/simplesamlphp": "<1.15.2", + "simplesamlphp/simplesamlphp": "<1.16.3", "simplesamlphp/simplesamlphp-module-infocard": "<1.0.1", "slim/slim": "<2.6", + "smarty/smarty": "<3.1.33", "socalnick/scn-social-auth": "<1.15.2", + "spoonity/tcpdf": "<6.2.22", "squizlabs/php_codesniffer": ">=1,<2.8.1|>=3,<3.0.1", "stormpath/sdk": ">=0,<9.9.99", "swiftmailer/swiftmailer": ">=4,<5.4.5", "sylius/admin-bundle": ">=1,<1.0.17|>=1.1,<1.1.9|>=1.2,<1.2.2", "sylius/sylius": ">=1,<1.0.17|>=1.1,<1.1.9|>=1.2,<1.2.2", "symfony/dependency-injection": ">=2,<2.0.17", - "symfony/form": ">=2.3,<2.3.35|>=2.4,<2.6.12|>=2.7,<2.7.38|>=2.8,<2.8.31|>=3,<3.2.14|>=3.3,<3.3.13", + "symfony/form": ">=2.3,<2.3.35|>=2.4,<2.6.12|>=2.7,<2.7.50|>=2.8,<2.8.49|>=3,<3.4.20|>=4,<4.0.15|>=4.1,<4.1.9|>=4.2,<4.2.1", "symfony/framework-bundle": ">=2,<2.3.18|>=2.4,<2.4.8|>=2.5,<2.5.2", "symfony/http-foundation": ">=2,<2.7.49|>=2.8,<2.8.44|>=3,<3.3.18|>=3.4,<3.4.14|>=4,<4.0.14|>=4.1,<4.1.3", "symfony/http-kernel": ">=2,<2.3.29|>=2.4,<2.5.12|>=2.6,<2.6.8", "symfony/intl": ">=2.7,<2.7.38|>=2.8,<2.8.31|>=3,<3.2.14|>=3.3,<3.3.13", + "symfony/polyfill": ">=1,<1.10", + "symfony/polyfill-php55": ">=1,<1.10", "symfony/routing": ">=2,<2.0.19", - "symfony/security": ">=2,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11", + "symfony/security": ">=2,<2.7.50|>=2.8,<2.8.49|>=3,<3.4.19|>=4,<4.0.15|>=4.1,<4.1.9|>=4.2,<4.2.1", "symfony/security-bundle": ">=2,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11", "symfony/security-core": ">=2.4,<2.6.13|>=2.7,<2.7.9|>=2.7.30,<2.7.32|>=2.8,<2.8.37|>=3,<3.3.17|>=3.4,<3.4.7|>=4,<4.0.7", "symfony/security-csrf": ">=2.4,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11", "symfony/security-guard": ">=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11", - "symfony/security-http": ">=2.3,<2.3.41|>=2.4,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11", + "symfony/security-http": ">=2.3,<2.3.41|>=2.4,<2.7.50|>=2.8,<2.8.49|>=3,<3.4.20|>=4,<4.0.15|>=4.1,<4.1.9|>=4.2,<4.2.1", "symfony/serializer": ">=2,<2.0.11", - "symfony/symfony": ">=2,<2.7.49|>=2.8,<2.8.44|>=3,<3.3.18|>=3.4,<3.4.14|>=4,<4.0.14|>=4.1,<4.1.3", + "symfony/symfony": ">=2,<2.7.50|>=2.8,<2.8.49|>=3,<3.4.20|>=4,<4.0.15|>=4.1,<4.1.9|>=4.2,<4.2.1", "symfony/translation": ">=2,<2.0.17", "symfony/validator": ">=2,<2.0.24|>=2.1,<2.1.12|>=2.2,<2.2.5|>=2.3,<2.3.3", "symfony/web-profiler-bundle": ">=2,<2.3.19|>=2.4,<2.4.9|>=2.5,<2.5.4", "symfony/yaml": ">=2,<2.0.22|>=2.1,<2.1.7", + "tecnickcom/tcpdf": "<6.2.22", "thelia/backoffice-default-template": ">=2.1,<2.1.2", "thelia/thelia": ">=2.1.0-beta1,<2.1.3|>=2.1,<2.1.2", + "theonedemon/phpwhois": "<=4.2.5", "titon/framework": ">=0,<9.9.99", + "truckersmp/phpwhois": "<=4.3.1", "twig/twig": "<1.20", - "typo3/cms": ">=6.2,<6.2.30|>=7,<7.6.30|>=8,<8.7.17|>=9,<9.3.2", - "typo3/cms-core": ">=8,<8.7.17|>=9,<9.3.2", + "typo3/cms": ">=6.2,<6.2.30|>=7,<7.6.32|>=8,<8.7.23|>=9,<9.5.4", + "typo3/cms-core": ">=8,<8.7.23|>=9,<9.5.4", "typo3/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.10|>=3.1,<3.1.7|>=3.2,<3.2.7|>=3.3,<3.3.5", "typo3/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4", + "ua-parser/uap-php": "<3.8", + "wallabag/tcpdf": "<6.2.22", "willdurand/js-translation-bundle": "<2.1.1", "yiisoft/yii": ">=1.1.14,<1.1.15", "yiisoft/yii2": "<2.0.15", @@ -583,7 +702,7 @@ "zendframework/zend-validator": ">=2.3,<2.3.6", "zendframework/zend-view": ">=2,<2.2.7|>=2.3,<2.3.1", "zendframework/zend-xmlrpc": ">=2.1,<2.1.6|>=2.2,<2.2.6", - "zendframework/zendframework": ">=2,<2.4.11|>=2.5,<2.5.1", + "zendframework/zendframework": "<2.5.1", "zendframework/zendframework1": "<1.12.20", "zendframework/zendopenid": ">=2,<2.0.2", "zendframework/zendxml": ">=1,<1.0.1", @@ -605,20 +724,20 @@ } ], "description": "Prevents installation of composer packages with known security vulnerabilities: no API, simply require it", - "time": "2018-08-07T14:47:17+00:00" + "time": "2019-02-14T08:06:11+00:00" }, { "name": "squizlabs/php_codesniffer", - "version": "3.3.1", + "version": "3.4.0", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "628a481780561150481a9ec74709092b9759b3ec" + "reference": "379deb987e26c7cd103a7b387aea178baec96e48" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/628a481780561150481a9ec74709092b9759b3ec", - "reference": "628a481780561150481a9ec74709092b9759b3ec", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/379deb987e26c7cd103a7b387aea178baec96e48", + "reference": "379deb987e26c7cd103a7b387aea178baec96e48", "shasum": "" }, "require": { @@ -656,7 +775,7 @@ "phpcs", "standards" ], - "time": "2018-07-26T23:47:18+00:00" + "time": "2018-12-19T23:57:18+00:00" } ], "aliases": [], @@ -667,7 +786,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=5.6" + "php": ">=7.1" }, "platform-dev": [] } diff --git a/config/application.php b/config/application.php index 269b977947..049cd4b3bf 100644 --- a/config/application.php +++ b/config/application.php @@ -24,10 +24,13 @@ /** * Use Dotenv to set required environment variables and load .env file in root */ -$dotenv = new Dotenv\Dotenv($root_dir); +$dotenv = Dotenv\Dotenv::create($root_dir); if (file_exists($root_dir . '/.env')) { $dotenv->load(); - $dotenv->required(['DB_NAME', 'DB_USER', 'DB_PASSWORD', 'WP_HOME', 'WP_SITEURL']); + $dotenv->required(['WP_HOME', 'WP_SITEURL']); + if (!env('DATABASE_URL')) { + $dotenv->required(['DB_NAME', 'DB_USER', 'DB_PASSWORD']); + } } /** @@ -60,6 +63,15 @@ Config::define('DB_COLLATE', ''); $table_prefix = env('DB_PREFIX') ?: 'wp_'; +if (env('DATABASE_URL')) { + $dsn = (object) parse_url(env('DATABASE_URL')); + + Config::define('DB_NAME', substr($dsn->path, 1)); + Config::define('DB_USER', $dsn->user); + Config::define('DB_PASSWORD', isset($dsn->pass) ? $dsn->pass : null); + Config::define('DB_HOST', isset($dsn->port) ? "{$dsn->host}:{$dsn->port}" : $dsn->host); +} + /** * Authentication Unique Keys and Salts */ @@ -89,6 +101,14 @@ Config::define('SCRIPT_DEBUG', false); ini_set('display_errors', 0); +/** + * Allow WordPress to detect HTTPS when used behind a reverse proxy or a load balancer + * See https://codex.wordpress.org/Function_Reference/is_ssl#Notes + */ +if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') { + $_SERVER['HTTPS'] = 'on'; +} + $env_config = __DIR__ . '/environments/' . WP_ENV . '.php'; if (file_exists($env_config)) { diff --git a/dependencies.yml b/dependencies.yml new file mode 100644 index 0000000000..5f3f0f7e17 --- /dev/null +++ b/dependencies.yml @@ -0,0 +1,13 @@ +# https://www.dependencies.io/docs/ +version: 2 +dependencies: +- type: php + path: / + lockfile_updates: + enabled: false + manifest_updates: + filters: + - name: "roots/wordpress" + versions: "Y.Y.Y" + - name: ".*" + versions: "L.Y" diff --git a/web/app/mu-plugins/bedrock-autoloader.php b/web/app/mu-plugins/bedrock-autoloader.php index 506bd4e84d..67c6d86f19 100644 --- a/web/app/mu-plugins/bedrock-autoloader.php +++ b/web/app/mu-plugins/bedrock-autoloader.php @@ -114,7 +114,7 @@ private function checkCache() { $cache = get_site_option('bedrock_autoloader'); - if ($cache === false) { + if ($cache === false || (isset($cache['plugins'], $cache['count']) && count($cache['plugins']) !== $cache['count'])) { $this->updateCache(); return; } diff --git a/wp-cli.yml b/wp-cli.yml index 398a5efe82..f807cbf4e1 100644 --- a/wp-cli.yml +++ b/wp-cli.yml @@ -1 +1,3 @@ path: web/wp +server: + docroot: web