From 2cac9cc4989434de82eac0005a7513bc3480d63d Mon Sep 17 00:00:00 2001 From: Nathan Boiron Date: Tue, 16 Jul 2024 23:56:50 +0200 Subject: [PATCH] Suppression du code dans l'ancien planete-php --- Makefile | 7 +- README.md | 6 +- behat-planete.yml | 18 --- compose.override.yml-dist | 5 - compose.yml | 39 ----- composer.json | 3 +- docker/dockerfiles/planete/Dockerfile | 33 ----- docker/dockerfiles/planete/apache.conf | 19 --- docker/dockerfiles/planete/apache.crt | 35 ----- docker/dockerfiles/planete/apache.key | 51 ------- htdocs/pages/planete/app.php | 51 ------- htdocs/pages/planete/flux.php | 3 - htdocs/pages/planete/index.php | 3 - htdocs/pages/planete/rss.php | 3 - htdocs/pages/planete/styles.css | 153 -------------------- planete/app/.htaccess | 7 - planete/app/PlaneteAppKernel.php | 45 ------ planete/app/Resources/views/flux.xml.twig | 21 --- planete/app/Resources/views/index.html.twig | 106 -------------- planete/app/Resources/views/rss.xml.twig | 23 --- planete/app/config/config.yml | 31 ---- planete/app/config/config_dev.yml | 23 --- planete/app/config/config_prod.yml | 18 --- planete/app/config/config_test.yml | 20 --- planete/app/config/routing.yml | 15 -- planete/app/config/routing_dev.yml | 14 -- planete/app/config/services.yml | 24 --- planete/tests/features/Home.feature | 11 -- planete/tests/features/Rss.feature | 10 -- sources/Afup/Bootstrap/Http.php | 3 - sources/PlanetePHP/PlaneteFluxAction.php | 51 ------- sources/PlanetePHP/PlaneteIndexAction.php | 43 ------ sources/PlanetePHP/PlaneteRssAction.php | 41 ------ 33 files changed, 5 insertions(+), 930 deletions(-) delete mode 100644 behat-planete.yml delete mode 100644 docker/dockerfiles/planete/Dockerfile delete mode 100644 docker/dockerfiles/planete/apache.conf delete mode 100644 docker/dockerfiles/planete/apache.crt delete mode 100644 docker/dockerfiles/planete/apache.key delete mode 100644 htdocs/pages/planete/app.php delete mode 100644 htdocs/pages/planete/flux.php delete mode 100644 htdocs/pages/planete/index.php delete mode 100644 htdocs/pages/planete/rss.php delete mode 100644 htdocs/pages/planete/styles.css delete mode 100644 planete/app/.htaccess delete mode 100644 planete/app/PlaneteAppKernel.php delete mode 100644 planete/app/Resources/views/flux.xml.twig delete mode 100644 planete/app/Resources/views/index.html.twig delete mode 100644 planete/app/Resources/views/rss.xml.twig delete mode 100644 planete/app/config/config.yml delete mode 100644 planete/app/config/config_dev.yml delete mode 100644 planete/app/config/config_prod.yml delete mode 100644 planete/app/config/config_test.yml delete mode 100644 planete/app/config/routing.yml delete mode 100644 planete/app/config/routing_dev.yml delete mode 100644 planete/app/config/services.yml delete mode 100644 planete/tests/features/Home.feature delete mode 100644 planete/tests/features/Rss.feature delete mode 100644 sources/PlanetePHP/PlaneteFluxAction.php delete mode 100644 sources/PlanetePHP/PlaneteIndexAction.php delete mode 100644 sources/PlanetePHP/PlaneteRssAction.php diff --git a/Makefile b/Makefile index 14a9713d5..b791cf7d6 100644 --- a/Makefile +++ b/Makefile @@ -74,11 +74,10 @@ behat: ### Tests fonctionnels test-functional: data config htdocs/uploads tmp - CURRENT_UID=$(CURRENT_UID) $(DOCKER_COMPOSE_BIN) stop dbtest apachephptest planetetest mailcatcher - CURRENT_UID=$(CURRENT_UID) $(DOCKER_COMPOSE_BIN) up -d dbtest apachephptest planetetest mailcatcher + CURRENT_UID=$(CURRENT_UID) $(DOCKER_COMPOSE_BIN) stop dbtest apachephptest mailcatcher + CURRENT_UID=$(CURRENT_UID) $(DOCKER_COMPOSE_BIN) up -d dbtest apachephptest mailcatcher CURRENT_UID=$(CURRENT_UID) $(DOCKER_COMPOSE_BIN) run --no-deps --rm cliphp ./bin/behat - CURRENT_UID=$(CURRENT_UID) $(DOCKER_COMPOSE_BIN) run --no-deps --rm cliphp ./bin/behat -c behat-planete.yml - CURRENT_UID=$(CURRENT_UID) $(DOCKER_COMPOSE_BIN) stop dbtest apachephptest planetetest mailcatcher + CURRENT_UID=$(CURRENT_UID) $(DOCKER_COMPOSE_BIN) stop dbtest apachephptest mailcatcher ### Analyse PHPStan phpstan: diff --git a/README.md b/README.md index 1bcbe419b..ed6f5731e 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,6 @@ Vous retrouverez les ports dans le fichier `compose.override.yml` Par défaut: * Site AFUP : -* Planète PHP : * Mailcatcher: _Les ports utilisés peuvent être modifiés dans le fichier `compose.override.yml`._ @@ -73,10 +72,7 @@ Lancement des tests fonctionnels : ``` ./bin/behat ``` -- Lancer les tests pour le site Planete PHP : -``` - ./bin/behat -c behat-planete.yml -``` + - Une alternative est d'utiliser la commande `make test-functional`, attention cette commande arrête les containeurs de tests à la fin de l'exécution de la suite de test. Si par la suite vous souhaitez lancer un test, il faut bien penser à les allumer de nouveau. Dans chacun des cas, il est possible de spécifier un test dans la ligne de commande. Exemple: `./bin/behat tests/behat/features/Admin/AdminFeuilles.feature` diff --git a/behat-planete.yml b/behat-planete.yml deleted file mode 100644 index 224234d10..000000000 --- a/behat-planete.yml +++ /dev/null @@ -1,18 +0,0 @@ -default: - autoload: - '': %paths.base%/tests/behat/bootstrap - suites: - features: - paths: - - %paths.base%/planete/tests - contexts: - - FeatureContext - - Behat\MinkExtension\Context\MinkContext - extensions: - Behat\MinkExtension: - base_url: 'https://planetetest:80' - sessions: - default: - goutte: - guzzle_parameters: - verify: false diff --git a/compose.override.yml-dist b/compose.override.yml-dist index 75a2d70f8..fb437c11f 100644 --- a/compose.override.yml-dist +++ b/compose.override.yml-dist @@ -8,11 +8,6 @@ services: - "9205:80" # environment: # XDEBUG_CONFIG: "remote_connect_back=1 profiler_enable=1 remote_autostart=0 remote_enable=1" - planete: - ports: - - "9215:80" - environment: - AFUP_GLOBAL_MENU_PREFIX: 'https://localhost:9205' mailcatcher: ports: - "1181:1080" diff --git a/compose.yml b/compose.yml index bfaa568e0..342fddeb9 100644 --- a/compose.yml +++ b/compose.yml @@ -66,44 +66,6 @@ services: dbtest: condition: service_healthy - planete: - build: - context: ./docker/dockerfiles/planete - args: - uid: ${CURRENT_UID:-1001} - gid: "1001" - environment: - SYMFONY_ENV: "dev" - env_file: - .env - volumes: - - ./:/var/www/html - links: - - db - - mailcatcher - - planetetest: - build: - context: ./docker/dockerfiles/planete - args: - uid: ${CURRENT_UID:-1001} - gid: "1001" - ENABLE_XDEBUG: ${ENABLE_XDEBUG:-false} - environment: - SYMFONY_ENV: "test" - env_file: - .env - volumes: - - ./:/var/www/html - healthcheck: - test: ["CMD", "curl", "-f", "https://planetetest:80"] - interval: 30s - timeout: 10s - retries: 5 - depends_on: - dbtest: - condition: service_healthy - cliphp: build: context: ./docker/dockerfiles/apachephp @@ -121,7 +83,6 @@ services: - apachephp - mailcatcher - apachephptest - - planetetest - dbtest - statictestresources command: "false" diff --git a/composer.json b/composer.json index 25af87d52..afcc95740 100644 --- a/composer.json +++ b/composer.json @@ -75,8 +75,7 @@ }, "classmap": [ "app/AppKernel.php", - "app/AppCache.php", - "planete/app/PlaneteAppKernel.php" + "app/AppCache.php" ], "files": [ "sources/Afup/Bootstrap/_Common.php", diff --git a/docker/dockerfiles/planete/Dockerfile b/docker/dockerfiles/planete/Dockerfile deleted file mode 100644 index 7edb19439..000000000 --- a/docker/dockerfiles/planete/Dockerfile +++ /dev/null @@ -1,33 +0,0 @@ -FROM php:7.0-apache - -RUN echo 'deb http://archive.debian.org/debian stretch main' > /etc/apt/sources.list - -# Install required php extensions for afup website and other management package -RUN apt-get update && \ - docker-php-ext-install pdo_mysql && \ - apt-get autoremove --purge -y && \ - rm -rf /var/lib/apt/lists/* - -# Configuration of apache & php -COPY apache.conf /etc/apache2/sites-available/000-default.conf - -RUN a2enmod rewrite && \ - echo "Include sites-enabled/" >> /etc/apache2/apache2.conf && \ - rm /etc/apache2/sites-enabled/000-default.conf && \ - ln -s /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-enabled/000-default.conf && \ - echo "date.timezone=Europe/Paris" >> "/usr/local/etc/php/php.ini" - -# Install local user mapped to the host user uid -ARG uid=1008 -ARG gid=1008 - -RUN groupadd -g ${gid} localUser && \ - useradd -l -u ${uid} -g ${gid} -m -s /bin/bash localUser && \ - usermod -a -G www-data localUser && \ - sed --in-place "s/User \${APACHE_RUN_USER}/User localUser/" /etc/apache2/apache2.conf && \ - sed --in-place "s/Group \${APACHE_RUN_GROUP}/Group localUser/" /etc/apache2/apache2.conf - -COPY apache.crt /etc/apache2/ssl/apache.crt -COPY apache.key /etc/apache2/ssl/apache.key - -RUN a2enmod ssl diff --git a/docker/dockerfiles/planete/apache.conf b/docker/dockerfiles/planete/apache.conf deleted file mode 100644 index 5b876502d..000000000 --- a/docker/dockerfiles/planete/apache.conf +++ /dev/null @@ -1,19 +0,0 @@ - - SSLEngine On - SSLCertificateFile /etc/apache2/ssl/apache.crt - SSLCertificateKeyFile /etc/apache2/ssl/apache.key - - DocumentRoot /var/www/html/htdocs/pages/planete - - - Options +Indexes +FollowSymLinks - Require all granted - AllowOverride None - - - - AllowOverride none - Require all granted - - - diff --git a/docker/dockerfiles/planete/apache.crt b/docker/dockerfiles/planete/apache.crt deleted file mode 100644 index 5f2e6b6e6..000000000 --- a/docker/dockerfiles/planete/apache.crt +++ /dev/null @@ -1,35 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIGFTCCA/2gAwIBAgIJAOQVkAeZEpj8MA0GCSqGSIb3DQEBCwUAMFkxCzAJBgNV -BAYTAkZSMQ4wDAYDVQQIDAVQYXJpczEOMAwGA1UEBwwFUGFyaXMxFTATBgNVBAoM -DE1PTlNJRVVSIEJJWjETMBEGA1UEAwwKKi5hZnVwLmRldjAeFw0xNzA2MTcxNjA3 -NTlaFw0yNzA2MTUxNjA3NTlaMFkxCzAJBgNVBAYTAkZSMQ4wDAYDVQQIDAVQYXJp -czEOMAwGA1UEBwwFUGFyaXMxFTATBgNVBAoMDE1PTlNJRVVSIEJJWjETMBEGA1UE -AwwKKi5hZnVwLmRldjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANds -tKTQvIwu+ks2TB7YiCo1r6w9R4oPQ1364DCJWm9M9yrYOqSYxC2wjnOFjlgWD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kFz5HYYYEp2zfGdf0FpR8hU0jkmIeeN7P9qsJRiOmd+ -nQqbWZet672Y+Uzey6t0WUviAZCD5gVDBkkFD4pQiPd34Jj13H6fgB3Hd4aa1wZR -8dDNokxlWMY2TZzpyW2lslp8Gt4PHUrzxEEGeh+SJOj+MBYQblZkVIF2iM3FJRvx -3LgqAW9oUIwoRN3YgTmAtuR/e8pB4fBo4nGgfatwMbKQ1ncknWHMbsXkm2TehSqe -8VisitICw2rSmuWvlzHe/d0EqGoyDXN00wd0uWQfejlEXATPYnD1Ps0Wej9ymaml -885/1/2vinA3LOK4f/0W+UZg6kW+jO6L5P9MRh2rhJOuWPZEcX3/If2Gki17OnZW -WS+2rPKTtTTxjwvlkhtDbG8r+TFV3C5YE16B0uTFx5iQBzit4EKOLqY50KMFctqk -D7WEP3WvPO/+GkVaDWuY265xSsZ8eLPEEt+/xQ6E4YX0peSOijZpOs3ABR7D5y50 -Mf2kGtXVb5it3VorExFPor0w/vfbks487ROi2AGftXoI3R96fK7HJXRqyc8SSId5 -D7wwRsw3hoZULKQ1+jgXl47Ig1tzER5/ZA== ------END CERTIFICATE----- diff --git a/docker/dockerfiles/planete/apache.key b/docker/dockerfiles/planete/apache.key deleted file mode 100644 index c3fb364ce..000000000 --- a/docker/dockerfiles/planete/apache.key +++ /dev/null @@ -1,51 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIJJwIBAAKCAgEA12y0pNC8jC76SzZMHtiIKjWvrD1Hig9DXfrgMIlab0z3Ktg6 -pJjELbCOc4WOWBYM072ApYaHI2wG57QcNdsY+6OYLL+ukHKxWrMz3bTSsJFL0iA2 -1Q2wOaCYduPGvVilN+RgPddpiRN9esMr9dTJTC3mk37UoDLLACvocsrPfqPsXMG0 -hzccxbaf1VnUxhpFahbIPOSes8GPb7cr/HAmvinqDB/mWe4dDtFyeYv1DqKgsBTa -Idei/4us9m2QLYd0MfJ4twl/WXTuXEA8OXYMCuYdk4+lBKJxpau1MF1LWshVYfX6 -Vh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xE7sFOn -ArafAoIBABE6rnsAcZY6Q8fyL1EUqLHOlIA9exGeniAly7zJk2+/6oaI86INUrRy -tE6huUhTu6KGZWlVKpr3rXjAGcpA6bKh9IVzI4xKtf4vBcC6gVw5dQxanVvopYk/ -zvCBohwAhPx3KGLRgdqI7EzTA/mcZajByk4AM6eQinZUGE2q0uAfBYqtVxmDQeXW -5qakTHR1UoI8R8GsjStb40LLZv5nZwy5nzj4p+njujlgyPnsr81D7CwiYMBTdITx -YDUxSPRq0FRlRb7h3Nm68qH5En5oYFNJP/oRS2jXeMqFzoQNsOsv5N15huRHbz4m -70Vhb4P2g9SauT/TGW/S4G00xAQh3IcCggEAASW1otZRk85R3t26NVS1HiJjP8Nn -kwOWxrQBbZolOMNbCzXcSkBkuLFtnrB0qfjxDIiXzuFgXNDZ3FcBiClBd3cB0puC -kwd+EkPM68RxD1DJ3LN3rnw7p6UHd2F72STUFAHYoucPXPGHYUBFcw08eoQdOONm -qy+xEtBtdwYSAz94OmBLp8lGI2APwxghhTm0UlaeIVo2tHbrzm9AvMTibNP3F7S/ -q1CMyw5EtxvYwWD0rEYQZqRl4G5fw84SPsaf74hZYL0g6c/T/FTRVX0h4yyrEETP -xbtpykOLUQy/obMQNL9EEurwKXq6GdhG1JFIFWpuSp3uOzzMjEYIIzxrmA== ------END RSA PRIVATE KEY----- diff --git a/htdocs/pages/planete/app.php b/htdocs/pages/planete/app.php deleted file mode 100644 index ccee78e7c..000000000 --- a/htdocs/pages/planete/app.php +++ /dev/null @@ -1,51 +0,0 @@ -loadClassCache(); -$request = Request::createFromGlobals(); -$response = $kernel->handle($request); -$response->send(); -$kernel->terminate($request, $response); diff --git a/htdocs/pages/planete/flux.php b/htdocs/pages/planete/flux.php deleted file mode 100644 index 698c99566..000000000 --- a/htdocs/pages/planete/flux.php +++ /dev/null @@ -1,3 +0,0 @@ - .container > h2 { - margin: 15px 0 10px 0; - padding: 0; -} - -.container { - max-width: 1170px; - margin: 0 auto; -} - -#en-tete { - background-color: #36a7df; - margin: 0 auto; - height: 40px; - font-family: Roboto, Helvetica, sans-serif; -} - - -.en-tete-title { - margin: 0 50px 0 0; - display: inline-block; - color: #fff; - font-weight: bold; -} - -.en-tete-links { - margin: 0 50px 0 60px; - display: inline-block; -} - -a.en-tete-link, .en-tete-link { - color: #fff; - text-decoration: none; - padding: 10px 20px; - display: inline-block; -} - -#le-contenu { - margin : 0 auto; - border : 1px solid white; -} - -#les-billets .un-billet { - padding : 10px; -} - -#les-billets span { - margin-right : 1em; -} - -#les-billets .flux a { - color : #31395A; - text-decoration : none; - font-weight : bold; -} - -#les-billets .flux a:hover { - text-decoration : underline; -} - -#les-billets .auteur, #les-billets .date { - color : #31395A; -} - -#les-billets h3 { - font-size : 1.5em; - margin-top : 0.3em; - margin-bottom : 0.2em; - font-family: Roboto, Helvetica, sans-serif; -} - -#les-billets h3 a { - color : #31395A; - text-decoration : none; -} - - - -#les-billets .contenu { - width: 95%; - margin: 0 auto 1em auto; -} - -#les-billets .contenu img { - max-width: 100%; -} - -#les-billets .contenu pre { - white-space: pre-wrap; - word-wrap: break-word; - text-align: justify; -} - -#les-billets h3.titre { - background-color: #1d2241; - padding: 10px; -} - -#les-billets h3.titre a { - color: #fff; -} - -#les-billets h3.titre a:hover { - text-decoration : underline; -} - -.btn { - border: 1px solid #666; - padding: 10px; - text-decoration: none; - margin: 10px auto 0 auto; - display: block; - text-align: center; - width: 70%; - color: #000; -} - -@media screen and (max-width: 640px) { - #en-tete { - height: auto; - } - .en-tete-title { - text-align: center; - display: block; - margin: 0; - } - .en-tete-links { - display:block; - margin: 0; - } -} diff --git a/planete/app/.htaccess b/planete/app/.htaccess deleted file mode 100644 index fb1de45bd..000000000 --- a/planete/app/.htaccess +++ /dev/null @@ -1,7 +0,0 @@ - - Require all denied - - - Order deny,allow - Deny from all - diff --git a/planete/app/PlaneteAppKernel.php b/planete/app/PlaneteAppKernel.php deleted file mode 100644 index 0af68d488..000000000 --- a/planete/app/PlaneteAppKernel.php +++ /dev/null @@ -1,45 +0,0 @@ -getEnvironment(), ['dev', 'test'], true)) { - $bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle(); - $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle(); - } - - return $bundles; - } - - public function getRootDir() - { - return __DIR__; - } - - public function getCacheDir() - { - return dirname(dirname(__DIR__)).'/var/cache/planete_'.$this->getEnvironment(); - } - - public function getLogDir() - { - return dirname(dirname(__DIR__)).'/var/logs'; - } - - public function registerContainerConfiguration(LoaderInterface $loader) - { - $loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml'); - } -} diff --git a/planete/app/Resources/views/flux.xml.twig b/planete/app/Resources/views/flux.xml.twig deleted file mode 100644 index 844d2850b..000000000 --- a/planete/app/Resources/views/flux.xml.twig +++ /dev/null @@ -1,21 +0,0 @@ - - - {{ feed.title }} - - {{ feed.date }} - - {{ feed.author }} - {{ feed.email }} - {{ feed.url|escape }} - - {{ feed.url }} - {% for article in articles %} - - {{ article.title|escape }} - - {{ article.url|escape }} - {{ article.update }} - {{ article.content }} - - {% endfor %} - diff --git a/planete/app/Resources/views/index.html.twig b/planete/app/Resources/views/index.html.twig deleted file mode 100644 index c3553c71e..000000000 --- a/planete/app/Resources/views/index.html.twig +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - - Planete PHP FR : tous les blogs PHP francophones - - - - - - - - - - - - - - - -
-
- -

Articles

-
- {% for article in articles %} -
-

{{ article.title }}

- {{ article.feedName }} - {% if article.feedName != article.author %} - {{ article.author }} - {% endif %} - {{ article.update|date('d/m/Y') }} -
{{ article.content|raw|nl2br }}
-
- {% endfor %} -
- {% if next >= 0 %} - Articles précédents - {% endif %} - {% if previous >= 0 %} - Articles suivants - {% endif %} -
-
- - -

Blogs

- - - -

Infos

- Ajouter une source ?
-

Envoyez un email avec l'URL du site et du flux à planetephpfr AT afup POINT org

- Gestion -

AFUP

-
-
- - - diff --git a/planete/app/Resources/views/rss.xml.twig b/planete/app/Resources/views/rss.xml.twig deleted file mode 100644 index 0ff411b22..000000000 --- a/planete/app/Resources/views/rss.xml.twig +++ /dev/null @@ -1,23 +0,0 @@ - - - - {{ feed.title }} - {{ feed.title }} - {{ feed.link }} - fr-fr - {{ feed.date }} - Tue, 10 Jun 2003 09:41:01 GMT - AFUP - à la mano - {{ feed.email }} ({{ feed.author }}) - - {% for article in articles %} - - {{ article.title|escape }} - {{ article.url|escape }} - {{ article.content|escape }} - {{ article.update }} - {{ article.url|escape }} - - {% endfor %} - - diff --git a/planete/app/config/config.yml b/planete/app/config/config.yml deleted file mode 100644 index f3e389dc1..000000000 --- a/planete/app/config/config.yml +++ /dev/null @@ -1,31 +0,0 @@ -imports: - - { resource: ../../../app/config/config.php } - - { resource: services.yml } - -parameters: - locale: fr - -framework: - translator: { fallbacks: ["%locale%"], enabled: true } - secret: "%secret%" - router: - resource: "%kernel.root_dir%/config/routing.yml" - strict_requirements: ~ - form: ~ - csrf_protection: ~ - validation: { enable_annotations: true } - templating: - engines: ['twig'] - default_locale: "%locale%" - trusted_hosts: ~ - session: - storage_id: session.storage.php_bridge - handler_id: ~ - fragments: ~ - http_method_override: true - assets: ~ - -# Twig Configuration -twig: - debug: "%kernel.debug%" - strict_variables: "%kernel.debug%" diff --git a/planete/app/config/config_dev.yml b/planete/app/config/config_dev.yml deleted file mode 100644 index c6e1d0575..000000000 --- a/planete/app/config/config_dev.yml +++ /dev/null @@ -1,23 +0,0 @@ -imports: - - { resource: config.yml } - -framework: - router: - resource: "%kernel.root_dir%/config/routing_dev.yml" - strict_requirements: true - profiler: { only_exceptions: false } - -web_profiler: - toolbar: true - intercept_redirects: false - -monolog: - handlers: - main: - type: stream - path: "%kernel.logs_dir%/%kernel.environment%.log" - level: debug - channels: ["!event"] - console: - type: console - channels: ["!event", "!doctrine"] diff --git a/planete/app/config/config_prod.yml b/planete/app/config/config_prod.yml deleted file mode 100644 index 7ff4eddc4..000000000 --- a/planete/app/config/config_prod.yml +++ /dev/null @@ -1,18 +0,0 @@ -imports: - - { resource: config.yml } - -monolog: - handlers: - main: - type: fingers_crossed - action_level: error - handler: nested - nested: - type: stream - path: "%kernel.logs_dir%/%kernel.environment%.log" - level: debug - syslog_handler: - type: syslog - level: error - console: - type: console diff --git a/planete/app/config/config_test.yml b/planete/app/config/config_test.yml deleted file mode 100644 index b2daa58a3..000000000 --- a/planete/app/config/config_test.yml +++ /dev/null @@ -1,20 +0,0 @@ -imports: - - { resource: config_dev.yml } - -framework: - test: ~ - session: - storage_id: session.storage.mock_file - profiler: - collect: false - -web_profiler: - toolbar: false - intercept_redirects: false - -parameters: - database_host: dbtest - database_port: 3306 - database_name: web - database_user: afup - database_password: afup diff --git a/planete/app/config/routing.yml b/planete/app/config/routing.yml deleted file mode 100644 index a6c1bacaa..000000000 --- a/planete/app/config/routing.yml +++ /dev/null @@ -1,15 +0,0 @@ -planete_flux: - path: /flux.php - defaults: {_controller: PlanetePHP\PlaneteFluxAction} - -planete_rss: - path: /rss.php - defaults: {_controller: PlanetePHP\PlaneteRssAction} - -planete: - path: /{page} - defaults: - _controller: PlanetePHP\PlaneteIndexAction - page: index.php - requirements: - page: 'index.php' diff --git a/planete/app/config/routing_dev.yml b/planete/app/config/routing_dev.yml deleted file mode 100644 index 404f6a3bc..000000000 --- a/planete/app/config/routing_dev.yml +++ /dev/null @@ -1,14 +0,0 @@ -_wdt: - resource: "@WebProfilerBundle/Resources/config/routing/wdt.xml" - prefix: /_wdt - -_profiler: - resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml" - prefix: /_profiler - -_errors: - resource: "@TwigBundle/Resources/config/routing/errors.xml" - prefix: /_error - -_main: - resource: routing.yml diff --git a/planete/app/config/services.yml b/planete/app/config/services.yml deleted file mode 100644 index b53317d8e..000000000 --- a/planete/app/config/services.yml +++ /dev/null @@ -1,24 +0,0 @@ -services: - _defaults: - public: false - autowire: true - autoconfigure: true - - AppBundle\LegacyModelFactory: ~ - - PlanetePHP\: - resource: '../../../sources/PlanetePHP/*Action.php' - tags: [controller.service_arguments] - - PlanetePHP\FeedArticleRepository: ~ - PlanetePHP\FeedRepository: ~ - - Doctrine\DBAL\Configuration: ~ - Doctrine\DBAL\Connection: - factory: [Doctrine\DBAL\DriverManager, 'getConnection'] - arguments: - - {url: 'mysql://%database_user%:%database_password%@%database_host%:%database_port%/%database_name%?charset=utf8mb4'} - - '@Doctrine\DBAL\Configuration' - - Afup\Site\Utils\Configuration: - autowire: true diff --git a/planete/tests/features/Home.feature b/planete/tests/features/Home.feature deleted file mode 100644 index beb0bee14..000000000 --- a/planete/tests/features/Home.feature +++ /dev/null @@ -1,11 +0,0 @@ -Feature: Planete PHP - Home - - @reloadDbWithTestData - Scenario: On voit bien toute la page - Given I am on the homepage - Then I should see "planete-php.fr" - Then I should see "Un titre" - Then I should see "Un 2e titre" - Then I should see "Envoyez un email avec l'URL du site et du flux à planetephpfr AT afup POINT org" - When I follow "Articles précédents" - Then I should see "Articles précédents Articles suivants" diff --git a/planete/tests/features/Rss.feature b/planete/tests/features/Rss.feature deleted file mode 100644 index 9bebcc478..000000000 --- a/planete/tests/features/Rss.feature +++ /dev/null @@ -1,10 +0,0 @@ -Feature: Planete PHP - RSS - - @reloadDbWithTestData - Scenario: On accède bien au flux RSS - Given I am on the homepage - When I follow "RSS Feed" - Then the response should contain "planete php fr" - Then the response should contain "Un titre" - Then the response should contain "Un 2e titre" - Then the response should contain "" diff --git a/sources/Afup/Bootstrap/Http.php b/sources/Afup/Bootstrap/Http.php index c1793e8f0..e6f4ccca0 100644 --- a/sources/Afup/Bootstrap/Http.php +++ b/sources/Afup/Bootstrap/Http.php @@ -54,9 +54,6 @@ $url = substr($_SERVER['REQUEST_URI'], 0, $position); $parties = explode('/', $url); $sous_site = array_pop($parties); -if (empty($sous_site) and strpos($_SERVER['HTTP_HOST'], "planete") !== false) { - $sous_site = "planete"; -} // initialisation de Smarty, le moteur de template (html) diff --git a/sources/PlanetePHP/PlaneteFluxAction.php b/sources/PlanetePHP/PlaneteFluxAction.php deleted file mode 100644 index 8734fddc9..000000000 --- a/sources/PlanetePHP/PlaneteFluxAction.php +++ /dev/null @@ -1,51 +0,0 @@ -feedArticleRepository = $feedArticleRepository; - $this->urlGenerator = $urlGenerator; - $this->twig = $twig; - } - - public function __invoke(Request $request) - { - $articles = $this->feedArticleRepository->findLatest(0, DATE_ATOM, 20); - foreach ($articles as $article) { - $article->setContent(htmlspecialchars(html_entity_decode(strip_tags($article->getContent())))); - } - - $response = new Response($this->twig->render('flux.xml.twig', [ - 'feed' => [ - 'title' => 'planete php fr', - 'url' => $this->urlGenerator->generate('planete', [], UrlGeneratorInterface::ABSOLUTE_URL), - 'link' => $this->urlGenerator->generate('planete_flux', [], UrlGeneratorInterface::ABSOLUTE_URL), - 'email' => 'planetephpfr@afup.org', - 'author' => 'Perrick Penet / AFUP', - 'date' => date(DATE_ATOM), - ], - 'articles' => $articles, - ])); - $response->headers->set('Content-Type', 'application/atom+xml; charset=UTF-8'); - - return $response; - } -} diff --git a/sources/PlanetePHP/PlaneteIndexAction.php b/sources/PlanetePHP/PlaneteIndexAction.php deleted file mode 100644 index 1a42ae580..000000000 --- a/sources/PlanetePHP/PlaneteIndexAction.php +++ /dev/null @@ -1,43 +0,0 @@ -billetRepository = $billetRepository; - $this->feedRepository = $feedRepository; - $this->twig = $twig; - } - - public function __invoke(Request $request) - { - $page = $request->query->getInt('page'); - if ($page === -1) { - $page = 1; - } - $feedArticles = $this->billetRepository->findLatestTruncated($page); - - return new Response($this->twig->render('index.html.twig', [ - 'articles' => $feedArticles, - 'feeds' => $this->feedRepository->getListByLatest(), - 'next' => count($feedArticles) ? $page + 1 : 1, - 'previous' => $page - 1, - ])); - } -} diff --git a/sources/PlanetePHP/PlaneteRssAction.php b/sources/PlanetePHP/PlaneteRssAction.php deleted file mode 100644 index 96828edf6..000000000 --- a/sources/PlanetePHP/PlaneteRssAction.php +++ /dev/null @@ -1,41 +0,0 @@ -planeteBillet = $planeteBillet; - $this->twig = $twig; - } - - public function __invoke(Request $request) - { - $response = new Response($this->twig->render('rss.xml.twig', [ - 'feed' => [ - 'title' => 'planete php fr', - 'url' => 'http://planete-php.fr/', - 'link' => 'http://planete-php.fr/rss.php', - 'email' => 'planetephpfr@afup.org', - 'author' => 'Perrick Penet / AFUP', - 'date' => date(DATE_RSS), - ], - 'articles' => $this->planeteBillet->findLatest(0, DATE_RSS, 20), - ])); - $response->headers->set('Content-Type', 'text/xml; charset=UTF-8'); - - return $response; - } -}