Skip to content

Commit

Permalink
Simplify relative paths to webapp/vendor
Browse files Browse the repository at this point in the history
  • Loading branch information
tom93 committed Jul 20, 2024
1 parent bcf1355 commit a0fd9fd
Show file tree
Hide file tree
Showing 26 changed files with 33 additions and 34 deletions.
6 changes: 3 additions & 3 deletions webapp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions webapp/bin/console
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
11 changes: 5 additions & 6 deletions webapp/bin/phpunit
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
2 changes: 1 addition & 1 deletion webapp/public/css/bootstrap.min.css
2 changes: 1 addition & 1 deletion webapp/public/css/bootstrap.min.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion webapp/public/css/dataTables.bootstrap5.min.css
2 changes: 1 addition & 1 deletion webapp/public/css/fontawesome-all.min.css
2 changes: 1 addition & 1 deletion webapp/public/css/nv.d3.min.css
2 changes: 1 addition & 1 deletion webapp/public/css/nv.d3.min.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion webapp/public/css/select2-bootstrap-5-theme.min.css
2 changes: 1 addition & 1 deletion webapp/public/css/select2.min.css
2 changes: 1 addition & 1 deletion webapp/public/flags
2 changes: 1 addition & 1 deletion webapp/public/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion webapp/public/js/FileSaver.min.js
2 changes: 1 addition & 1 deletion webapp/public/js/FileSaver.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion webapp/public/js/bootstrap.bundle.min.js
2 changes: 1 addition & 1 deletion webapp/public/js/bootstrap.bundle.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion webapp/public/js/d3.min.js
2 changes: 1 addition & 1 deletion webapp/public/js/dataTables.bootstrap5.min.js
2 changes: 1 addition & 1 deletion webapp/public/js/dataTables.min.js
2 changes: 1 addition & 1 deletion webapp/public/js/jquery.min.js
2 changes: 1 addition & 1 deletion webapp/public/js/nv.d3.min.js
2 changes: 1 addition & 1 deletion webapp/public/js/nv.d3.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion webapp/public/js/select2.min.js
2 changes: 1 addition & 1 deletion webapp/public/webfonts
2 changes: 1 addition & 1 deletion webapp/tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -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')) {
Expand Down

0 comments on commit a0fd9fd

Please sign in to comment.