Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to PHP 8.1; add test setup script; monorepo update #4

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
vendor
composer.lock
*.swp
.idea
6 changes: 5 additions & 1 deletion Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ianmgg/php80:dev
FROM ianmgg/php81:dev

COPY ./scripts/docker/config/apache/mpm_prefork.conf /etc/apache2/mods-enabled/mpm_prefork.conf
COPY ./scripts/docker/config/apache/status.conf /etc/apache2/mods-enabled/status.conf
Expand All @@ -8,6 +8,10 @@ COPY ./scripts/docker/config/php/docker-php-ext-xdebug.ini /usr/local/etc/php/co
COPY ./scripts/docker/config/php/sessions.ini /usr/local/etc/php/conf.d/sessions.ini
COPY ./scripts/docker/config/cronjobs/crontab /etc/cron.d/crontab

# Hide deprecation and warning messages which prevent Flarum loading.
# This shouldn't be needed in most cases, but is available just in case.
# COPY ./scripts/docker/config/php/hide-deprecation.ini /usr/local/etc/php/conf.d/hide-deprecation.ini

RUN chmod 0644 /etc/cron.d/crontab

WORKDIR /var/www
Expand Down
185 changes: 96 additions & 89 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,93 +1,100 @@
{
"name": "flarumite/flarum-docker",
"description": "Simple Docker image to aid Flarum extension development.",
"type": "metapackage",
"keywords": [
"flarum",
"docker"
],
"homepage": "https://github.com/flarumite/flarum-docker",
"license": "MIT",
"authors": [
{
"name": "Ian Morland",
"email": "[email protected]"
},
{
"name": "David Wheatley",
"email": "[email protected]"
}
],
"support": {
"issues": "https://github.com/flarumite/flarum-docker/issues",
"source": "https://github.com/flarumite/flarum-docker",
"docs": "https://flarum.org/docs/"
"name": "flarumite/flarum-docker",
"description": "Simple Docker image to aid Flarum extension development.",
"type": "metapackage",
"keywords": [
"flarum",
"docker"
],
"homepage": "https://github.com/flarumite/flarum-docker",
"license": "MIT",
"authors": [
{
"name": "Ian Morland",
"email": "[email protected]"
},
"require": {
"php": "^8.0",
"blomstra/cache-assets": "*",
"blomstra/database-queue": "*",
"blomstra/flarum-redis": "*",
"blomstra/search": "*",
"davwheat/custom-sidenav-links": "*",
"flarum/approval": "*",
"flarum/bbcode": "*",
"flarum/core": "^1.1",
"flarum/emoji": "*",
"flarum/flags": "*",
"flarum/lang-english": "*",
"flarum/likes": "*",
"flarum/lock": "*",
"flarum/markdown": "*",
"flarum/mentions": "*",
"flarum/nicknames": "*",
"flarum/statistics": "*",
"flarum/sticky": "*",
"flarum/subscriptions": "*",
"flarum/suspend": "*",
"flarum/tags": "*",
"fof/best-answer": "*",
"fof/byobu": "*",
"fof/default-user-preferences": "*",
"fof/follow-tags": "*",
"fof/formatting": "*",
"fof/gamification": "*",
"fof/geoip": "*",
"fof/ignore-users": "*",
"fof/impersonate": "*",
"fof/linguist": "*",
"fof/links": "*",
"fof/moderator-notes": "*",
"fof/nightmode": "*",
"fof/oauth": "*",
"fof/pages": "*",
"fof/profile-image-crop": "*",
"fof/reactions": "*",
"fof/sitemap": "*",
"fof/split": "*",
"fof/upload": "*",
"fof/user-bio": "*",
"fof/user-directory": "*",
"fof/username-request": "*",
"ianm/follow-users": "*",
"ianm/gravatar": "*",
"ianm/oauth-amazon": "*",
"ianm/synopsis": "*",
"league/flysystem-aws-s3-v3": "*"
{
"name": "David Wheatley",
"email": "[email protected]"
}
],
"support": {
"issues": "https://github.com/flarumite/flarum-docker/issues",
"source": "https://github.com/flarumite/flarum-docker",
"docs": "https://flarum.org/docs/"
},
"require": {
"php": "^8.1",
"blomstra/cache-assets": "*",
"blomstra/database-queue": "*",
"blomstra/flarum-redis": "*",
"blomstra/search": "*",
"blomstra/test-notification-dispatcher": "*",
"davwheat/custom-sidenav-links": "*",
"flarum/approval": "*",
"flarum/bbcode": "*",
"flarum/core": "^1.1",
"flarum/emoji": "*",
"flarum/flags": "*",
"flarum/lang-english": "*",
"flarum/likes": "*",
"flarum/lock": "*",
"flarum/markdown": "*",
"flarum/mentions": "*",
"flarum/nicknames": "*",
"flarum/statistics": "*",
"flarum/sticky": "*",
"flarum/subscriptions": "*",
"flarum/suspend": "*",
"flarum/tags": "*",
"fof/best-answer": "*",
"fof/byobu": "*",
"fof/clockwork": "^1.0",
"fof/default-user-preferences": "*",
"fof/follow-tags": "*",
"fof/formatting": "*",
"fof/gamification": "*",
"fof/geoip": "*",
"fof/ignore-users": "*",
"fof/impersonate": "*",
"fof/linguist": "*",
"fof/links": "*",
"fof/moderator-notes": "*",
"fof/nightmode": "*",
"fof/oauth": "*",
"fof/pages": "*",
"fof/profile-image-crop": "*",
"fof/reactions": "*",
"fof/sitemap": "*",
"fof/split": "*",
"fof/upload": "*",
"fof/user-bio": "*",
"fof/user-directory": "*",
"fof/username-request": "*",
"ianm/follow-users": "*",
"ianm/gravatar": "*",
"ianm/oauth-amazon": "*",
"ianm/synopsis": "*",
"league/flysystem-aws-s3-v3": "*",
"migratetoflarum/fake-data": "*"
},
"require-dev": {
"symfony/var-dumper": "*"
},
"config": {
"preferred-install": "dist",
"sort-packages": true
},
"minimum-stability": "dev",
"prefer-stable": true,
"repositories": [
{
"type": "path",
"url": "workbench/*"
},
"require-dev": {
"symfony/var-dumper": "*"
},
"config": {
"preferred-install": "dist",
"sort-packages": true
},
"minimum-stability": "dev",
"prefer-stable": true,
"repositories": [
{
"type": "path",
"url": "workbench/*"
}
]
{
"type": "path",
"url": "framework/*/*"
}
]
}
6 changes: 6 additions & 0 deletions flarum_test_env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
export DB_HOST=127.0.0.1
export DB_DATABASE=flarum_test
export DB_PORT=3306
export DB_USERNAME=root
export DB_PASSWORD=root
Empty file added framework/.gitkeep
Empty file.
1 change: 1 addition & 0 deletions scripts/docker/config/php/hide-deprecation.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For dev purposes, do we actually want to hide deprecation notices? Surely they're useful..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, that's a good point. I think there were some deprecation warnings that broke Flarum with 8.1 at the time I actually added this locally.

Maybe keep the file, but comment it out in the Dockerfile so it's not enabled unless needed for some reason?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That seems like a good compromise :)

2 changes: 1 addition & 1 deletion scripts/docker/config/php/sessions.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
; Handler used to store/retrieve data.
; http://www.php.net/manual/en/session.configuration.php#ini.session.save-handler
session.cache_expire = 1800
session.cookie_lifetime = 1800
session.cookie_lifetime = 1800