From a0fd9fd0d7d6714c2585393971db67f2d7932f21 Mon Sep 17 00:00:00 2001 From: Tom Levy Date: Sat, 20 Jul 2024 12:33:54 +0000 Subject: [PATCH] Simplify relative paths to webapp/vendor --- webapp/Makefile | 6 +++--- webapp/bin/console | 4 ++-- webapp/bin/phpunit | 11 +++++------ webapp/public/css/bootstrap.min.css | 2 +- webapp/public/css/bootstrap.min.css.map | 2 +- webapp/public/css/dataTables.bootstrap5.min.css | 2 +- webapp/public/css/fontawesome-all.min.css | 2 +- webapp/public/css/nv.d3.min.css | 2 +- webapp/public/css/nv.d3.min.css.map | 2 +- webapp/public/css/select2-bootstrap-5-theme.min.css | 2 +- webapp/public/css/select2.min.css | 2 +- webapp/public/flags | 2 +- webapp/public/index.php | 2 +- webapp/public/js/FileSaver.min.js | 2 +- webapp/public/js/FileSaver.min.js.map | 2 +- webapp/public/js/bootstrap.bundle.min.js | 2 +- webapp/public/js/bootstrap.bundle.min.js.map | 2 +- webapp/public/js/d3.min.js | 2 +- webapp/public/js/dataTables.bootstrap5.min.js | 2 +- webapp/public/js/dataTables.min.js | 2 +- webapp/public/js/jquery.min.js | 2 +- webapp/public/js/nv.d3.min.js | 2 +- webapp/public/js/nv.d3.min.js.map | 2 +- webapp/public/js/select2.min.js | 2 +- webapp/public/webfonts | 2 +- webapp/tests/bootstrap.php | 2 +- 26 files changed, 33 insertions(+), 34 deletions(-) diff --git a/webapp/Makefile b/webapp/Makefile index 168fc197719..439c24078c5 100644 --- a/webapp/Makefile +++ b/webapp/Makefile @@ -26,7 +26,7 @@ copy-bundle-assets: # the include paths are broken. We just copy in the data we need -rm -rf public/bundles/nelmioapidoc mkdir -p public/bundles/nelmioapidoc - cp -R ../webapp/vendor/nelmio/api-doc-bundle/public/* public/bundles/nelmioapidoc/ + cp -R vendor/nelmio/api-doc-bundle/public/* public/bundles/nelmioapidoc/ clean-l: -rm -rf public/bundles/nelmioapidoc @@ -44,9 +44,9 @@ install-domserver: # Now change all relative symlinks in webapp/public to their correct paths for link in $$(find $(DESTDIR)$(domserver_webappdir)/public/$$dir -maxdepth 2 -type l); do \ target=$$(readlink $$link) ; \ - if echo $${target} | grep -q '\.\./\.\./webapp/vendor' ; then \ + if echo $${target} | grep -q '\.\./vendor' ; then \ rm $$link ; \ - realtarget=$(domserver_webappdir)/vendor$$(echo $${target} | sed 's!^.*\.\./\.\./webapp/vendor!!') ; \ + realtarget=$(domserver_webappdir)/vendor$$(echo $${target} | sed 's!^.*\.\./vendor!!') ; \ ln -s $$realtarget $$link ; \ fi \ done diff --git a/webapp/bin/console b/webapp/bin/console index 9c5528985c6..ec90dd3d58a 100755 --- a/webapp/bin/console +++ b/webapp/bin/console @@ -4,11 +4,11 @@ use App\Kernel; use Symfony\Bundle\FrameworkBundle\Console\Application; -if (!is_file(dirname(__DIR__, 2) . '/webapp/vendor/autoload_runtime.php')) { +if (!is_file(dirname(__DIR__) . '/vendor/autoload_runtime.php')) { throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".'); } -require_once dirname(__DIR__, 2) . '/webapp/vendor/autoload_runtime.php'; +require_once dirname(__DIR__) . '/vendor/autoload_runtime.php'; require_once dirname(__DIR__) . '/config/load_db_secrets.php'; set_time_limit(0); diff --git a/webapp/bin/phpunit b/webapp/bin/phpunit index 5c0103facc5..cefea84bfa2 100755 --- a/webapp/bin/phpunit +++ b/webapp/bin/phpunit @@ -5,20 +5,19 @@ if (!ini_get('date.timezone')) { ini_set('date.timezone', 'UTC'); } -if (is_file(dirname(__DIR__, 2) . '/webapp/vendor/phpunit/phpunit/phpunit')) { +if (is_file(dirname(__DIR__) . '/vendor/phpunit/phpunit/phpunit')) { if (PHP_VERSION_ID >= 80000) { - require dirname(__DIR__, 2) . '/webapp/vendor/phpunit/phpunit/phpunit'; + require dirname(__DIR__) . '/vendor/phpunit/phpunit/phpunit'; } else { - define('PHPUNIT_COMPOSER_INSTALL', dirname(__DIR__, 2) . '/webapp/vendor/autoload.php'); + define('PHPUNIT_COMPOSER_INSTALL', dirname(__DIR__) . '/vendor/autoload.php'); require PHPUNIT_COMPOSER_INSTALL; PHPUnit\TextUI\Command::main(); } } else { - if (!is_file(dirname(__DIR__, - 2) . '/webapp/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) { + if (!is_file(dirname(__DIR__) . '/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) { echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`.\n"; exit(1); } - require dirname(__DIR__, 2) . '/webapp/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php'; + require dirname(__DIR__) . '/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php'; } diff --git a/webapp/public/css/bootstrap.min.css b/webapp/public/css/bootstrap.min.css index fa68530566f..8be6e0f2c43 120000 --- a/webapp/public/css/bootstrap.min.css +++ b/webapp/public/css/bootstrap.min.css @@ -1 +1 @@ -../../../webapp/vendor/twbs/bootstrap/dist/css/bootstrap.min.css \ No newline at end of file +../../vendor/twbs/bootstrap/dist/css/bootstrap.min.css \ No newline at end of file diff --git a/webapp/public/css/bootstrap.min.css.map b/webapp/public/css/bootstrap.min.css.map index 3d87f0fe071..80d05e88d05 120000 --- a/webapp/public/css/bootstrap.min.css.map +++ b/webapp/public/css/bootstrap.min.css.map @@ -1 +1 @@ -../../../webapp/vendor/twbs/bootstrap/dist/css/bootstrap.min.css.map \ No newline at end of file +../../vendor/twbs/bootstrap/dist/css/bootstrap.min.css.map \ No newline at end of file diff --git a/webapp/public/css/dataTables.bootstrap5.min.css b/webapp/public/css/dataTables.bootstrap5.min.css index 77167b8859b..c2bb4544bfe 120000 --- a/webapp/public/css/dataTables.bootstrap5.min.css +++ b/webapp/public/css/dataTables.bootstrap5.min.css @@ -1 +1 @@ -../../../webapp/vendor/datatables.net/datatables.net-bs5/css/dataTables.bootstrap5.min.css \ No newline at end of file +../../vendor/datatables.net/datatables.net-bs5/css/dataTables.bootstrap5.min.css \ No newline at end of file diff --git a/webapp/public/css/fontawesome-all.min.css b/webapp/public/css/fontawesome-all.min.css index ffde6faef16..a95a7f46b0e 120000 --- a/webapp/public/css/fontawesome-all.min.css +++ b/webapp/public/css/fontawesome-all.min.css @@ -1 +1 @@ -../../../webapp/vendor/fortawesome/font-awesome/css/all.min.css \ No newline at end of file +../../vendor/fortawesome/font-awesome/css/all.min.css \ No newline at end of file diff --git a/webapp/public/css/nv.d3.min.css b/webapp/public/css/nv.d3.min.css index 56d338a6bc4..9a26ecc6cda 120000 --- a/webapp/public/css/nv.d3.min.css +++ b/webapp/public/css/nv.d3.min.css @@ -1 +1 @@ -../../../webapp/vendor/novus/nvd3/build/nv.d3.min.css \ No newline at end of file +../../vendor/novus/nvd3/build/nv.d3.min.css \ No newline at end of file diff --git a/webapp/public/css/nv.d3.min.css.map b/webapp/public/css/nv.d3.min.css.map index fa5cbf0a6d0..220b5722a55 120000 --- a/webapp/public/css/nv.d3.min.css.map +++ b/webapp/public/css/nv.d3.min.css.map @@ -1 +1 @@ -../../../webapp/vendor/novus/nvd3/build/nv.d3.min.css.map \ No newline at end of file +../../vendor/novus/nvd3/build/nv.d3.min.css.map \ No newline at end of file diff --git a/webapp/public/css/select2-bootstrap-5-theme.min.css b/webapp/public/css/select2-bootstrap-5-theme.min.css index fc2433cf4b9..cd8fd07b88f 120000 --- a/webapp/public/css/select2-bootstrap-5-theme.min.css +++ b/webapp/public/css/select2-bootstrap-5-theme.min.css @@ -1 +1 @@ -../../../webapp/vendor/apalfrey/select2-bootstrap-5-theme/dist/select2-bootstrap-5-theme.min.css \ No newline at end of file +../../vendor/apalfrey/select2-bootstrap-5-theme/dist/select2-bootstrap-5-theme.min.css \ No newline at end of file diff --git a/webapp/public/css/select2.min.css b/webapp/public/css/select2.min.css index 01a4127a40d..adb8a9e6fcc 120000 --- a/webapp/public/css/select2.min.css +++ b/webapp/public/css/select2.min.css @@ -1 +1 @@ -../../../webapp/vendor/select2/select2/dist/css/select2.min.css \ No newline at end of file +../../vendor/select2/select2/dist/css/select2.min.css \ No newline at end of file diff --git a/webapp/public/flags b/webapp/public/flags index be0ef4207a4..d54be4395b0 120000 --- a/webapp/public/flags +++ b/webapp/public/flags @@ -1 +1 @@ -../../webapp/vendor/components/flag-icon-css/flags \ No newline at end of file +../vendor/components/flag-icon-css/flags \ No newline at end of file diff --git a/webapp/public/index.php b/webapp/public/index.php index dcf7df44c90..1fd07b5fb53 100644 --- a/webapp/public/index.php +++ b/webapp/public/index.php @@ -2,7 +2,7 @@ use App\Kernel; -require_once dirname(__DIR__, 2) . '/webapp/vendor/autoload_runtime.php'; +require_once dirname(__DIR__) . '/vendor/autoload_runtime.php'; require_once dirname(__DIR__) . '/config/load_db_secrets.php'; return function (array $context) { diff --git a/webapp/public/js/FileSaver.min.js b/webapp/public/js/FileSaver.min.js index bd8e875fc5d..2d4de7b2785 120000 --- a/webapp/public/js/FileSaver.min.js +++ b/webapp/public/js/FileSaver.min.js @@ -1 +1 @@ -../../../webapp/vendor/eligrey/filesaver/dist/FileSaver.min.js \ No newline at end of file +../../vendor/eligrey/filesaver/dist/FileSaver.min.js \ No newline at end of file diff --git a/webapp/public/js/FileSaver.min.js.map b/webapp/public/js/FileSaver.min.js.map index 1243f31bd86..8c92a5a1b10 120000 --- a/webapp/public/js/FileSaver.min.js.map +++ b/webapp/public/js/FileSaver.min.js.map @@ -1 +1 @@ -../../../webapp/vendor/eligrey/filesaver/dist/FileSaver.min.js.map \ No newline at end of file +../../vendor/eligrey/filesaver/dist/FileSaver.min.js.map \ No newline at end of file diff --git a/webapp/public/js/bootstrap.bundle.min.js b/webapp/public/js/bootstrap.bundle.min.js index 032894a5a4a..0889d279571 120000 --- a/webapp/public/js/bootstrap.bundle.min.js +++ b/webapp/public/js/bootstrap.bundle.min.js @@ -1 +1 @@ -../../../webapp/vendor/twbs/bootstrap/dist/js/bootstrap.bundle.min.js \ No newline at end of file +../../vendor/twbs/bootstrap/dist/js/bootstrap.bundle.min.js \ No newline at end of file diff --git a/webapp/public/js/bootstrap.bundle.min.js.map b/webapp/public/js/bootstrap.bundle.min.js.map index 575d0033126..61f03fce666 120000 --- a/webapp/public/js/bootstrap.bundle.min.js.map +++ b/webapp/public/js/bootstrap.bundle.min.js.map @@ -1 +1 @@ -../../../webapp/vendor/twbs/bootstrap/dist/js/bootstrap.bundle.min.js.map \ No newline at end of file +../../vendor/twbs/bootstrap/dist/js/bootstrap.bundle.min.js.map \ No newline at end of file diff --git a/webapp/public/js/d3.min.js b/webapp/public/js/d3.min.js index 2a889b43df3..27b19c4f7ab 120000 --- a/webapp/public/js/d3.min.js +++ b/webapp/public/js/d3.min.js @@ -1 +1 @@ -../../../webapp/vendor/mbostock/d3/d3.min.js \ No newline at end of file +../../vendor/mbostock/d3/d3.min.js \ No newline at end of file diff --git a/webapp/public/js/dataTables.bootstrap5.min.js b/webapp/public/js/dataTables.bootstrap5.min.js index e615d225ce3..3b9c9206a6d 120000 --- a/webapp/public/js/dataTables.bootstrap5.min.js +++ b/webapp/public/js/dataTables.bootstrap5.min.js @@ -1 +1 @@ -../../../webapp/vendor/datatables.net/datatables.net-bs5/js/dataTables.bootstrap5.min.js \ No newline at end of file +../../vendor/datatables.net/datatables.net-bs5/js/dataTables.bootstrap5.min.js \ No newline at end of file diff --git a/webapp/public/js/dataTables.min.js b/webapp/public/js/dataTables.min.js index 1431e0ad14d..179e4bf6256 120000 --- a/webapp/public/js/dataTables.min.js +++ b/webapp/public/js/dataTables.min.js @@ -1 +1 @@ -../../../webapp/vendor/datatables.net/datatables.net/js/dataTables.min.js \ No newline at end of file +../../vendor/datatables.net/datatables.net/js/dataTables.min.js \ No newline at end of file diff --git a/webapp/public/js/jquery.min.js b/webapp/public/js/jquery.min.js index c205f23afa4..2380e192170 120000 --- a/webapp/public/js/jquery.min.js +++ b/webapp/public/js/jquery.min.js @@ -1 +1 @@ -../../../webapp/vendor/components/jquery/jquery.min.js \ No newline at end of file +../../vendor/components/jquery/jquery.min.js \ No newline at end of file diff --git a/webapp/public/js/nv.d3.min.js b/webapp/public/js/nv.d3.min.js index c56dd4d8cbb..319ecf7354c 120000 --- a/webapp/public/js/nv.d3.min.js +++ b/webapp/public/js/nv.d3.min.js @@ -1 +1 @@ -../../../webapp/vendor/novus/nvd3/build/nv.d3.min.js \ No newline at end of file +../../vendor/novus/nvd3/build/nv.d3.min.js \ No newline at end of file diff --git a/webapp/public/js/nv.d3.min.js.map b/webapp/public/js/nv.d3.min.js.map index d110759e788..b4dd186d125 120000 --- a/webapp/public/js/nv.d3.min.js.map +++ b/webapp/public/js/nv.d3.min.js.map @@ -1 +1 @@ -../../../webapp/vendor/novus/nvd3/build/nv.d3.min.js.map \ No newline at end of file +../../vendor/novus/nvd3/build/nv.d3.min.js.map \ No newline at end of file diff --git a/webapp/public/js/select2.min.js b/webapp/public/js/select2.min.js index 3bc026821cd..491cfe1ed45 120000 --- a/webapp/public/js/select2.min.js +++ b/webapp/public/js/select2.min.js @@ -1 +1 @@ -../../../webapp/vendor/select2/select2/dist/js/select2.min.js \ No newline at end of file +../../vendor/select2/select2/dist/js/select2.min.js \ No newline at end of file diff --git a/webapp/public/webfonts b/webapp/public/webfonts index da8b1756760..a7aa14cc23f 120000 --- a/webapp/public/webfonts +++ b/webapp/public/webfonts @@ -1 +1 @@ -../../webapp/vendor/fortawesome/font-awesome/webfonts \ No newline at end of file +../vendor/fortawesome/font-awesome/webfonts \ No newline at end of file diff --git a/webapp/tests/bootstrap.php b/webapp/tests/bootstrap.php index 38b58c63af5..e828dea3511 100644 --- a/webapp/tests/bootstrap.php +++ b/webapp/tests/bootstrap.php @@ -2,7 +2,7 @@ use Symfony\Component\Dotenv\Dotenv; -require dirname(__DIR__, 2) . '/webapp/vendor/autoload.php'; +require dirname(__DIR__) . '/vendor/autoload.php'; require dirname(__DIR__) . '/config/load_db_secrets.php'; if (file_exists(dirname(__DIR__) . '/config/bootstrap.php')) {