Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 1b5c85f

Browse files
author
DKravtsov
committedJul 21, 2024·
Updated composer dependencies, added fish shell, bash completion.
1 parent bc5512b commit 1b5c85f

File tree

21 files changed

+1306
-864
lines changed

21 files changed

+1306
-864
lines changed
 

‎.idea/htdocs.iml

Lines changed: 0 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ RUN if [ "$BUILD_ARGUMENT_ENV" = "default" ]; then echo "Set BUILD_ARGUMENT_ENV
2525

2626
# install all the dependencies and enable PHP modules
2727
RUN apt-get update && apt-get upgrade -y && apt-get install -y \
28+
bash-completion \
29+
fish \
2830
procps \
2931
nano \
3032
git \
@@ -81,6 +83,9 @@ COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
8183
RUN chmod +x /usr/bin/composer
8284
ENV COMPOSER_ALLOW_SUPERUSER 1
8385

86+
# Enable Composer autocompletion
87+
RUN composer completion bash > /etc/bash_completion.d/composer
88+
8489
# add supervisor
8590
RUN mkdir -p /var/log/supervisor
8691
COPY --chown=root:root ./docker/general/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
@@ -92,6 +97,15 @@ WORKDIR $APP_HOME
9297

9398
USER ${USERNAME}
9499

100+
# Add necessary stuff to bash autocomplete
101+
RUN echo 'source /usr/share/bash-completion/bash_completion' >> /home/${USERNAME}/.bashrc \
102+
&& echo 'alias console="/app/bin/console"' >> /home/${USERNAME}/.bashrc
103+
104+
# copy fish configs
105+
COPY --chown=${USERNAME}:${USERNAME} ./docker/fish/completions/ /home/${USERNAME}/.config/fish/completions/
106+
COPY --chown=${USERNAME}:${USERNAME} ./docker/fish/functions/ /home/${USERNAME}/.config/fish/functions/
107+
COPY --chown=${USERNAME}:${USERNAME} ./docker/fish/config.fish /home/${USERNAME}/.config/fish/config.fish
108+
95109
# copy source files
96110
COPY --chown=${USERNAME}:${USERNAME} . $APP_HOME/
97111

‎Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,13 @@ else
180180
$(ERROR_ONLY_FOR_HOST)
181181
endif
182182

183+
fish: ## Get fish shell inside symfony docker container
184+
ifeq ($(INSIDE_DOCKER_CONTAINER), 0)
185+
@HOST_UID=$(HOST_UID) HOST_GID=$(HOST_GID) WEB_PORT_HTTP=$(WEB_PORT_HTTP) WEB_PORT_SSL=$(WEB_PORT_SSL) XDEBUG_CONFIG=$(XDEBUG_CONFIG) XDEBUG_VERSION=$(XDEBUG_VERSION) MYSQL_VERSION=$(MYSQL_VERSION) INNODB_USE_NATIVE_AIO=$(INNODB_USE_NATIVE_AIO) SQL_MODE=$(SQL_MODE) docker compose $(PROJECT_NAME) exec $(OPTION_T) $(PHP_USER) symfony fish
186+
else
187+
$(ERROR_ONLY_FOR_HOST)
188+
endif
189+
183190
ssh-nginx: ## Get bash inside nginx docker container
184191
ifeq ($(INSIDE_DOCKER_CONTAINER), 0)
185192
@HOST_UID=$(HOST_UID) HOST_GID=$(HOST_GID) WEB_PORT_HTTP=$(WEB_PORT_HTTP) WEB_PORT_SSL=$(WEB_PORT_SSL) XDEBUG_CONFIG=$(XDEBUG_CONFIG) XDEBUG_VERSION=$(XDEBUG_VERSION) MYSQL_VERSION=$(MYSQL_VERSION) INNODB_USE_NATIVE_AIO=$(INNODB_USE_NATIVE_AIO) SQL_MODE=$(SQL_MODE) docker compose $(PROJECT_NAME) exec nginx /bin/sh

‎composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"Elasticsearch"
1515
],
1616
"homepage": "https://github.com/systemsdk/docker-symfony-api",
17-
"version": "v3.1.0",
17+
"version": "v3.1.1",
1818
"license": "MIT",
1919
"authors": [
2020
{
@@ -47,13 +47,13 @@
4747
"doctrine/orm": "^2.19",
4848
"dukecity/command-scheduler-bundle": "^6.0",
4949
"elasticsearch/elasticsearch": "^7.17",
50-
"gedmo/doctrine-extensions": "^3.15",
51-
"lexik/jwt-authentication-bundle": "^3.0",
50+
"gedmo/doctrine-extensions": "^3.16",
51+
"lexik/jwt-authentication-bundle": "^3.1",
5252
"mark-gerarts/automapper-plus-bundle": "^1.5",
5353
"matomo/device-detector": "^6.3",
5454
"matthiasnoback/symfony-console-form": "^6.0",
55-
"nelmio/api-doc-bundle": "^4.26",
56-
"nelmio/cors-bundle": "^2.4",
55+
"nelmio/api-doc-bundle": "^4.28",
56+
"nelmio/cors-bundle": "^2.5",
5757
"phpdocumentor/reflection-docblock": "^5.4",
5858
"ramsey/uuid-doctrine": "^2.1",
5959
"symfony/amqp-messenger": "7.1.*",
@@ -102,7 +102,7 @@
102102
"roave/security-advisories": "dev-latest",
103103
"symfony/browser-kit": "7.1.*",
104104
"symfony/debug-bundle": "7.1.*",
105-
"symfony/maker-bundle": "^1.59",
105+
"symfony/maker-bundle": "^1.60",
106106
"symfony/requirements-checker": "^2.0",
107107
"symfony/stopwatch": "7.1.*",
108108
"symfony/var-dumper": "7.1.*",

‎composer.lock

Lines changed: 218 additions & 212 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎docker/fish/completions/composer.fish

Lines changed: 341 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# This file is part of the Symfony package.
2+
#
3+
# (c) Fabien Potencier <fabien@symfony.com>
4+
#
5+
# For the full copyright and license information, please view
6+
# https://symfony.com/doc/current/contributing/code/license.html
7+
8+
function _sf_console
9+
set sf_cmd (commandline -o)
10+
set c (count (commandline -oc))
11+
12+
set completecmd "$sf_cmd[1]" "_complete" "--no-interaction" "-sfish" "-a1"
13+
14+
for i in $sf_cmd
15+
if [ $i != "" ]
16+
set completecmd $completecmd "-i$i"
17+
end
18+
end
19+
20+
set completecmd $completecmd "-c$c"
21+
22+
$completecmd
23+
end
24+
25+
complete -c 'console' -a '(_sf_console)' -f

‎docker/fish/config.fish

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
source /home/www-data/.config/fish/completions/sf_console.fish
2+
3+
if status is-interactive
4+
# Commands to run in interactive sessions can go here
5+
end

‎docker/fish/functions/console.fish

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Defined in - @ line 1
2+
function console --wraps=/var/www/html/bin/console --description 'alias console=/var/www/html/bin/console'
3+
/var/www/html/bin/console $argv;
4+
end

‎docs/commands.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ make generate-jwt-keys # Generates RSA keys for JWT
4040

4141
make ssh # Get bash inside symfony docker container
4242
make ssh-root # Get bash as root user inside symfony docker container
43+
make fish # Get fish shell inside symfony docker container (https://www.youtube.com/watch?v=C2a7jJTh3kU)
4344
make ssh-nginx # Get bash inside nginx docker container
4445
make ssh-supervisord # Get bash inside supervisord docker container (cron jobs running there, etc...)
4546
make ssh-mysql # Get bash inside mysql docker container

‎readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ make generate-jwt-keys
242242

243243
make ssh
244244
make ssh-root
245+
make fish
245246
make ssh-nginx
246247
make ssh-supervisord
247248
make ssh-mysql

‎tools/01_phpunit/composer.lock

Lines changed: 250 additions & 244 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎tools/02_phpstan/composer.lock

Lines changed: 38 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎tools/03_ecs/composer.lock

Lines changed: 62 additions & 56 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎tools/04_php-coveralls/composer.lock

Lines changed: 69 additions & 63 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎tools/05_phpinsights/composer.lock

Lines changed: 75 additions & 74 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎tools/06_phpmd/composer.lock

Lines changed: 44 additions & 38 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎tools/07_phpmetrics/composer.lock

Lines changed: 26 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎tools/08_rector/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"php": "^8.3.0"
66
},
77
"require-dev": {
8-
"rector/rector": "1.1.*",
8+
"rector/rector": "1.2.*",
99
"roave/security-advisories": "dev-latest"
1010
},
1111
"config": {

‎tools/08_rector/composer.lock

Lines changed: 38 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎tools/09_composer/composer.lock

Lines changed: 81 additions & 80 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
Please sign in to comment.