From 0b7af2760c9156cb1fdec7a14d2ab4c4fdc2b282 Mon Sep 17 00:00:00 2001 From: dena Date: Thu, 16 Jan 2025 10:44:14 +0100 Subject: [PATCH 1/4] fix Dockerfile --- Dockerfile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index c57b8cc..4904e9f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,21 +1,20 @@ -FROM composer@sha256:d374b2e1f715621e9d9929575d6b35b11cf4a6dc237d4a08f2e6d1611f534675 as composer -# composer is pinned at a PHP 7 version +FROM composer:2.8 as composer WORKDIR /installing COPY ./ /installing RUN composer install --no-dev --no-progress && rm -rf vendor/wbstack/magnustools -FROM php:7.2-apache +FROM php:8.1-apache LABEL org.opencontainers.image.source="https://github.com/wbstack/quickstatements" RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get install --yes --no-install-recommends gettext-base=0.19.8.1-9 jq=1.5+dfsg-2+b1 libicu-dev=63.1-6+deb10u3 && \ + DEBIAN_FRONTEND=noninteractive apt-get install --yes --no-install-recommends libasprintf0v5 jq libicu-dev icu-devtools && \ rm -rf /var/lib/apt/lists/* && \ docker-php-ext-configure intl && \ docker-php-ext-install intl && \ - pecl install redis-4.0.1 && \ + pecl install redis && \ docker-php-ext-enable redis ENV APACHE_DOCUMENT_ROOT /var/www/html/quickstatements/public_html From 4ccd6f421d6c96c20e17235df4e06dfad74b7035 Mon Sep 17 00:00:00 2001 From: dena Date: Thu, 16 Jan 2025 10:44:20 +0100 Subject: [PATCH 2/4] DEBUG update composer --- composer.json | 2 +- composer.lock | 220 +++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 211 insertions(+), 11 deletions(-) diff --git a/composer.json b/composer.json index 9952e18..77289e2 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,7 @@ ], "require": { "addwiki/mediawiki-api": "~2.0", - "wbstack/magnustools": "dev-main" + "wbstack/magnustools": "dev-de/sync-2024-01-14-A" }, "scripts": { "post-install-cmd": [ diff --git a/composer.lock b/composer.lock index 95c28f6..335383b 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,69 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "667f3586b254e3cb2d7c865409e31365", + "content-hash": "95f201eb5f7ad502ea5dbb90b681bf0e", "packages": [ + { + "name": "abraham/twitteroauth", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/abraham/twitteroauth.git", + "reference": "5a424e80a1200674451844fbaae8a0098a316a01" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/abraham/twitteroauth/zipball/5a424e80a1200674451844fbaae8a0098a316a01", + "reference": "5a424e80a1200674451844fbaae8a0098a316a01", + "shasum": "" + }, + "require": { + "composer/ca-bundle": "^1.2", + "ext-curl": "*", + "php": "^7.3 || ^7.4 || ^8.0" + }, + "require-dev": { + "php-vcr/php-vcr": "^1", + "php-vcr/phpunit-testlistener-vcr": "dev-php-8", + "phpmd/phpmd": "^2", + "phpunit/phpunit": "^8 || ^9", + "squizlabs/php_codesniffer": "^3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Abraham\\TwitterOAuth\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Abraham Williams", + "email": "abraham@abrah.am", + "homepage": "https://abrah.am", + "role": "Developer" + } + ], + "description": "The most popular PHP library for use with the Twitter OAuth REST API.", + "homepage": "https://twitteroauth.com", + "keywords": [ + "Twitter API", + "Twitter oAuth", + "api", + "oauth", + "rest", + "social", + "twitter" + ], + "support": { + "issues": "https://github.com/abraham/twitteroauth/issues", + "source": "https://github.com/abraham/twitteroauth" + }, + "time": "2021-06-11T02:56:14+00:00" + }, { "name": "addwiki/mediawiki-api", "version": "2.8.0", @@ -161,6 +222,82 @@ ], "time": "2021-02-16T19:46:19+00:00" }, + { + "name": "composer/ca-bundle", + "version": "1.5.5", + "source": { + "type": "git", + "url": "https://github.com/composer/ca-bundle.git", + "reference": "08c50d5ec4c6ced7d0271d2862dec8c1033283e6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/08c50d5ec4c6ced7d0271d2862dec8c1033283e6", + "reference": "08c50d5ec4c6ced7d0271d2862dec8c1033283e6", + "shasum": "" + }, + "require": { + "ext-openssl": "*", + "ext-pcre": "*", + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^8 || ^9", + "psr/log": "^1.0 || ^2.0 || ^3.0", + "symfony/process": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\CaBundle\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.", + "keywords": [ + "cabundle", + "cacert", + "certificate", + "ssl", + "tls" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/ca-bundle/issues", + "source": "https://github.com/composer/ca-bundle/tree/1.5.5" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2025-01-08T16:17:16+00:00" + }, { "name": "guzzlehttp/guzzle", "version": "7.4.0", @@ -472,6 +609,66 @@ ], "time": "2021-10-06T17:43:30+00:00" }, + { + "name": "mediawiki/oauthclient", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/wikimedia/mediawiki-oauthclient-php.git", + "reference": "ace642e67b8292a5e351c50daca7d3f2b25fa4cb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/wikimedia/mediawiki-oauthclient-php/zipball/ace642e67b8292a5e351c50daca7d3f2b25fa4cb", + "reference": "ace642e67b8292a5e351c50daca7d3f2b25fa4cb", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "ext-json": "*", + "php": ">=7.2.9", + "psr/log": "^1.0" + }, + "require-dev": { + "mediawiki/mediawiki-codesniffer": "37.0.0", + "mediawiki/minus-x": "1.1.1", + "php-parallel-lint/php-console-highlighter": "0.5.0", + "php-parallel-lint/php-parallel-lint": "1.3.0", + "phpunit/phpunit": "^8.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "MediaWiki\\OAuthClient\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-3.0-or-later" + ], + "authors": [ + { + "name": "Andy Smith", + "homepage": "http://termie.pbworks.com/w/page/20571888/AndySmith" + }, + { + "name": "Chris Steipp", + "email": "csteipp@wikimedia.org" + }, + { + "name": "Bryan Davis", + "email": "bd808@wikimedia.org" + } + ], + "description": "PHP OAuth client for use with Wikipedia and other MediaWiki-based wikis running the OAuth extension", + "homepage": "https://www.mediawiki.org/wiki/oauthclient-php", + "support": { + "docs": "https://www.mediawiki.org/wiki/oauthclient-php", + "issues": "https://phabricator.wikimedia.org/tag/oauth/", + "source": "https://github.com/wikimedia/oauthclient-php/" + }, + "time": "2021-10-21T13:34:48+00:00" + }, { "name": "psr/http-client", "version": "1.0.1", @@ -776,25 +973,27 @@ }, { "name": "wbstack/magnustools", - "version": "dev-main", + "version": "dev-de/sync-2024-01-14-A", "source": { "type": "git", "url": "https://github.com/wbstack/magnustools.git", - "reference": "48ac07b55a4ec22ceca052715a81a7995b052e9c" + "reference": "472015c48b4b3d4813cc9af536b06e0282b3822f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wbstack/magnustools/zipball/48ac07b55a4ec22ceca052715a81a7995b052e9c", - "reference": "48ac07b55a4ec22ceca052715a81a7995b052e9c", + "url": "https://api.github.com/repos/wbstack/magnustools/zipball/472015c48b4b3d4813cc9af536b06e0282b3822f", + "reference": "472015c48b4b3d4813cc9af536b06e0282b3822f", "shasum": "" }, "require": { + "abraham/twitteroauth": "^2.0", + "addwiki/mediawiki-api": "^2.8", + "mediawiki/oauthclient": "^1.2", "php": ">=7.0.0" }, "require-dev": { "phpunit/phpunit": "^8.0" }, - "default-branch": true, "type": "library", "autoload": { "psr-4": { @@ -815,9 +1014,10 @@ "description": "Useful classes for Wikimedia Toolforge", "homepage": "https://bitbucket.com/magnusmanske/magnustools", "support": { - "source": "https://github.com/wbstack/magnustools/tree/main" + "issues": "https://bitbucket.org/magnusmanske/magnustools/issues?status=new&status=open", + "source": "https://bitbucket.org/magnusmanske/magnustools/" }, - "time": "2024-10-29T14:02:01+00:00" + "time": "2025-01-14T17:25:32+00:00" } ], "packages-dev": [], @@ -828,7 +1028,7 @@ }, "prefer-stable": false, "prefer-lowest": false, - "platform": {}, - "platform-dev": {}, + "platform": [], + "platform-dev": [], "plugin-api-version": "2.6.0" } From e3282b05b42632605766da1a94428eb5441a4e39 Mon Sep 17 00:00:00 2001 From: Andrew Kostka Date: Mon, 3 Feb 2025 12:57:44 +0000 Subject: [PATCH 3/4] Update magnustools version --- composer.json | 2 +- composer.lock | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/composer.json b/composer.json index 77289e2..2718b01 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,7 @@ ], "require": { "addwiki/mediawiki-api": "~2.0", - "wbstack/magnustools": "dev-de/sync-2024-01-14-A" + "wbstack/magnustools": "dev-main#68dfeb87266a66d751fbf28937ffc03a779a8450" }, "scripts": { "post-install-cmd": [ diff --git a/composer.lock b/composer.lock index 335383b..cb88f13 100644 --- a/composer.lock +++ b/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": "95f201eb5f7ad502ea5dbb90b681bf0e", + "content-hash": "54ef9d2e47dcdb1014d1d9765dd8835c", "packages": [ { "name": "abraham/twitteroauth", @@ -973,16 +973,16 @@ }, { "name": "wbstack/magnustools", - "version": "dev-de/sync-2024-01-14-A", + "version": "dev-main", "source": { "type": "git", "url": "https://github.com/wbstack/magnustools.git", - "reference": "472015c48b4b3d4813cc9af536b06e0282b3822f" + "reference": "68dfeb87266a66d751fbf28937ffc03a779a8450" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wbstack/magnustools/zipball/472015c48b4b3d4813cc9af536b06e0282b3822f", - "reference": "472015c48b4b3d4813cc9af536b06e0282b3822f", + "url": "https://api.github.com/repos/wbstack/magnustools/zipball/68dfeb87266a66d751fbf28937ffc03a779a8450", + "reference": "68dfeb87266a66d751fbf28937ffc03a779a8450", "shasum": "" }, "require": { @@ -994,6 +994,7 @@ "require-dev": { "phpunit/phpunit": "^8.0" }, + "default-branch": true, "type": "library", "autoload": { "psr-4": { @@ -1017,7 +1018,7 @@ "issues": "https://bitbucket.org/magnusmanske/magnustools/issues?status=new&status=open", "source": "https://bitbucket.org/magnusmanske/magnustools/" }, - "time": "2025-01-14T17:25:32+00:00" + "time": "2025-01-29T10:54:17+00:00" } ], "packages-dev": [], @@ -1028,7 +1029,7 @@ }, "prefer-stable": false, "prefer-lowest": false, - "platform": [], - "platform-dev": [], + "platform": {}, + "platform-dev": {}, "plugin-api-version": "2.6.0" } From 18b9f1936750aa14b14c92355dfd1a2c41985856 Mon Sep 17 00:00:00 2001 From: Andrew Kostka Date: Mon, 3 Feb 2025 12:58:31 +0000 Subject: [PATCH 4/4] Update Dockerfile --- Dockerfile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4904e9f..5e52dd7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,17 +10,21 @@ FROM php:8.1-apache LABEL org.opencontainers.image.source="https://github.com/wbstack/quickstatements" RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get install --yes --no-install-recommends libasprintf0v5 jq libicu-dev icu-devtools && \ + DEBIAN_FRONTEND=noninteractive apt-get install --yes --no-install-recommends \ + libasprintf0v5=0.21-12 \ + jq=1.6-2.1 \ + libicu-dev=72.1-3 \ + icu-devtools=72.1-3 && \ rm -rf /var/lib/apt/lists/* && \ docker-php-ext-configure intl && \ docker-php-ext-install intl && \ - pecl install redis && \ + pecl install redis-6.1.0 && \ docker-php-ext-enable redis ENV APACHE_DOCUMENT_ROOT /var/www/html/quickstatements/public_html #TODO do 2 tuns in 1 layer.. -RUN sed -ri -e "s!/var/www/html!${APACHE_DOCUMENT_ROOT}!g" /etc/apache2/sites-available/*.conf -RUN sed -ri -e "s!/var/www/!${APACHE_DOCUMENT_ROOT}!g" /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf +RUN sed -ri -e "s!/var/www/html!${APACHE_DOCUMENT_ROOT}!g" /etc/apache2/sites-available/*.conf && \ + sed -ri -e "s!/var/www/!${APACHE_DOCUMENT_ROOT}!g" /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf COPY docker/entrypoint.sh /entrypoint.sh COPY docker/php.ini /usr/local/etc/php/conf.d/php.ini