Skip to content

Commit

Permalink
Rename site/ dir to app/ and site/app to app/src (#402)
Browse files Browse the repository at this point in the history
I didn't like the `site` dir name, because "site" [means something](https://www.michalspacek.com/origin-site-etld-etld-plus-one-public-suffix-psl-what-are-they) but now I'm also using other domains than just a subdomain, so this isn't _site_. I think `app` is better but because I already had `app`, I had to rename that one as well. `src` also seems more common.

Nice number of changed files, heh.
  • Loading branch information
spaze authored Oct 6, 2024
2 parents ff4753e + cb11614 commit d62ad25
Show file tree
Hide file tree
Showing 3,666 changed files with 112 additions and 112 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
build-mode: ${{ matrix.build-mode }}
config: |
paths-ignore:
- site/vendor/tracy/tracy/src/Tracy/Dumper/assets/dumper.js
- app/vendor/tracy/tracy/src/Tracy/Dumper/assets/dumper.js
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/php-latte.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ jobs:
with:
coverage: none
php-version: ${{ matrix.php-version }}
- run: make --directory=site phpstan-latte-templates
- run: make --directory=app phpstan-latte-templates
6 changes: 3 additions & 3 deletions .github/workflows/php-tester-include-skipped.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ jobs:
run: |
sudo mkdir --parents /srv/www
sudo ln --symbolic $GITHUB_WORKSPACE /srv/www
- run: make --directory=site tester-include-skipped
- run: make --directory=app tester-include-skipped
- name: Failed test output, if any
if: failure()
run: for i in $(find ./site/tests -name \*.actual); do echo "--- $i"; cat $i; echo; echo; done
run: for i in $(find ./app/tests -name \*.actual); do echo "--- $i"; cat $i; echo; echo; done
- name: Upload test code coverage
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
if: success()
with:
name: Test code coverage (PHP ${{ matrix.php-version }})
path: 'site/temp/coverage.html'
path: 'app/temp/coverage.html'
retention-days: 5
34 changes: 17 additions & 17 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ jobs:
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Validate composer.json and composer.lock
run: composer --working-dir=site validate
run: composer --working-dir=app validate

check-file-patterns:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- run: make --directory=site check-file-patterns
- run: make --directory=app check-file-patterns

check-makefile:
runs-on: ubuntu-latest
Expand All @@ -56,7 +56,7 @@ jobs:
with:
coverage: none
php-version: ${{ matrix.php-version }}
- run: make --directory=site check-makefile
- run: make --directory=app check-makefile

check-application-mapping:
runs-on: ubuntu-latest
Expand All @@ -70,13 +70,13 @@ jobs:
with:
coverage: none
php-version: ${{ matrix.php-version }}
- run: make --directory=site check-application-mapping
- run: make --directory=app check-application-mapping

check-sri-macros-concat:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- run: make --directory=site check-sri-macros-concat
- run: make --directory=app check-sri-macros-concat

lint-php:
runs-on: ubuntu-latest
Expand All @@ -90,7 +90,7 @@ jobs:
with:
coverage: none
php-version: ${{ matrix.php-version }}
- run: make --directory=site lint-php
- run: make --directory=app lint-php

lint-latte:
runs-on: ubuntu-latest
Expand All @@ -104,7 +104,7 @@ jobs:
with:
coverage: none
php-version: ${{ matrix.php-version }}
- run: make --directory=site lint-latte
- run: make --directory=app lint-latte

lint-neon:
runs-on: ubuntu-latest
Expand All @@ -118,13 +118,13 @@ jobs:
with:
coverage: none
php-version: ${{ matrix.php-version }}
- run: make --directory=site lint-neon
- run: make --directory=app lint-neon

lint-xml:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- run: make --directory=site lint-xml-auto-install
- run: make --directory=app lint-xml-auto-install

phpcs:
runs-on: ubuntu-latest
Expand All @@ -145,7 +145,7 @@ jobs:
with:
coverage: none
php-version: ${{ matrix.php-version }}
- run: make --directory=site phpcs
- run: make --directory=app phpcs

phpstan:
runs-on: ubuntu-latest
Expand All @@ -166,7 +166,7 @@ jobs:
with:
coverage: none
php-version: ${{ matrix.php-version }}
- run: make --directory=site phpstan
- run: make --directory=app phpstan

phpstan-vendor:
runs-on: ubuntu-latest
Expand All @@ -187,7 +187,7 @@ jobs:
with:
coverage: none
php-version: ${{ matrix.php-version }}
- run: make --directory=site phpstan-vendor
- run: make --directory=app phpstan-vendor

tester:
runs-on: ubuntu-latest
Expand All @@ -205,16 +205,16 @@ jobs:
run: |
sudo mkdir --parents /srv/www
sudo ln --symbolic $GITHUB_WORKSPACE /srv/www
- run: make --directory=site tester
- run: make --directory=app tester
- name: Failed test output, if any
if: failure()
run: for i in $(find ./site/tests -name \*.actual); do echo "--- $i"; cat $i; echo; echo; done
run: for i in $(find ./app/tests -name \*.actual); do echo "--- $i"; cat $i; echo; echo; done
- name: Upload test code coverage
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
if: success()
with:
name: Test code coverage (PHP ${{ matrix.php-version }})
path: 'site/temp/coverage.html'
path: 'app/temp/coverage.html'
retention-days: 5

psalm:
Expand All @@ -229,7 +229,7 @@ jobs:
with:
coverage: none
php-version: ${{ matrix.php-version }}
- run: make --directory=site psalm
- run: make --directory=app psalm

composer-dependency-analyser:
runs-on: ubuntu-latest
Expand All @@ -243,4 +243,4 @@ jobs:
with:
coverage: none
php-version: ${{ matrix.php-version }}
- run: make --directory=site composer-dependency-analyser
- run: make --directory=app composer-dependency-analyser
2 changes: 1 addition & 1 deletion .github/workflows/tls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
with:
coverage: none
php-version: ${{ matrix.php-version }}
- run: php site/bin/certmonitor.php --colors --no-ipv6
- run: php app/bin/certmonitor.php --colors --no-ipv6
env:
CERTMONITOR_USER: ${{ secrets.CERTMONITOR_USER }}
CERTMONITOR_KEY: ${{ secrets.CERTMONITOR_KEY }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/vulns.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ jobs:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: symfonycorp/security-checker-action@258311ef7ac571f1310780ef3d79fc5abef642b5 # v5
with:
lock: site/composer.lock
lock: app/composer.lock

composer-audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- run: make --directory=site composer-audit
- run: make --directory=app composer-audit

npm-audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- run: make --directory=site npm-audit
- run: make --directory=app npm-audit
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions site/Makefile → app/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ npm-audit:
npm audit

cs-fix:
vendor/bin/phpcbf app/ public/ tests/
vendor/bin/phpcbf src/ public/ tests/

check-file-patterns:
bin/check-file-patterns.sh
Expand All @@ -24,13 +24,13 @@ check-sri-macros-concat:
bin/check-sri-macros-concat.sh

lint-php:
vendor/php-parallel-lint/php-parallel-lint/parallel-lint --colors -e php,phtml,phpt,phpstub app/ public/ stubs/ tests/
vendor/php-parallel-lint/php-parallel-lint/parallel-lint --colors -e php,phtml,phpt,phpstub src/ public/ stubs/ tests/

lint-latte:
bin/latte-lint.php app/
bin/latte-lint.php src/

lint-neon:
vendor/nette/neon/bin/neon-lint app/
vendor/nette/neon/bin/neon-lint src/

lint-xml:
bin/xmllint.sh
Expand All @@ -39,7 +39,7 @@ lint-xml-auto-install:
bin/xmllint.sh --auto-install-with-apt-fast

phpcs:
vendor/bin/phpcs app/ public/ tests/
vendor/bin/phpcs src/ public/ tests/

phpstan:
vendor/phpstan/phpstan/phpstan -vvv --ansi analyse --configuration phpstan.neon
Expand All @@ -54,7 +54,7 @@ psalm:
vendor/bin/psalm.phar

tester:
vendor/nette/tester/src/tester -s -c tests/php-unix.ini --colors 1 --coverage temp/coverage.html --coverage-src app/ tests/
vendor/nette/tester/src/tester -s -c tests/php-unix.ini --colors 1 --coverage temp/coverage.html --coverage-src src/ tests/

tester-include-skipped:
TEST_CASE_RUNNER_INCLUDE_SKIPPED=1 \
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
->ignoreErrorsOnPackage('latte/latte', [ErrorType::UNUSED_DEPENDENCY])

// TestCaseRunner is used only in tests
->ignoreErrorsOnPackageAndPath('nette/tester', __DIR__ . '/app/Test/TestCaseRunner.php', [ErrorType::DEV_DEPENDENCY_IN_PROD])
->ignoreErrorsOnPackageAndPath('nette/tester', __DIR__ . '/src/Test/TestCaseRunner.php', [ErrorType::DEV_DEPENDENCY_IN_PROD])
;
2 changes: 1 addition & 1 deletion site/composer.json → app/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
},
"autoload": {
"psr-4": {
"MichalSpacekCz\\": "app/"
"MichalSpacekCz\\": "src/"
}
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion site/config/common.neon → app/config/common.neon
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ translation:
whitelist: %locales.all%
localeResolvers!: []
dirs:
- %siteDir%/app/lang
- %siteDir%/src/lang

subresourceIntegrity:
hashingAlgos:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion site/config/parameters.neon → app/config/parameters.neon
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ parameters:
domain:
sharedStaticRoot: https://www.%domain.root%
imagesRoot: i/images
locationRoot: /srv/www/michalspacek.cz/site/public/www.michalspacek.cz
locationRoot: /srv/www/michalspacek.cz/app/public/www.michalspacek.cz
reporting:
contentSecurityPolicy: https://plz.report-uri.com/r/default/csp/enforce
vatRate: 0.21
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions site/disallowed-calls.neon → app/disallowed-calls.neon
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ parameters:
superglobal: '$_SERVER'
message: 'use Application\ServerEnv instead'
allowIn:
- app/Application/ServerEnv.php
- src/Application/ServerEnv.php
- tests/Application/ServerEnvTest.phpt
disallowedClasses:
-
Expand All @@ -64,14 +64,14 @@ parameters:
- 'Nette\Forms\Form'
message: 'use MichalSpacekCz\Form\UiForm for better type declarations'
allowIn:
- app/Form/UiForm.php
- app/Form/Controls/TrainingControlsFactory.php
- src/Form/UiForm.php
- src/Form/Controls/TrainingControlsFactory.php
-
class:
- 'Spaze\PhpInfo\PhpInfo'
message: 'use MichalSpacekCz\Application\SanitizedPhpInfo with additional sanitization'
allowIn:
- app/Application/SanitizedPhpInfo.php
- src/Application/SanitizedPhpInfo.php

includes:
- vendor/spaze/phpstan-disallowed-calls/extension.neon
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Loading

0 comments on commit d62ad25

Please sign in to comment.