Skip to content

Commit

Permalink
chore: cs-style fixing and minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Antoine Lelaisant committed Sep 26, 2022
1 parent f07eda5 commit f2ea53d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM composer:2.4.1 as composer
FROM composer:2.1.9 as composer

##################################

FROM php:8.0.13-fpm-alpine3.13
FROM php:8.1-fpm-alpine

COPY --from=composer /usr/bin/composer /usr/bin/composer

Expand All @@ -11,9 +11,9 @@ RUN mkdir -p /usr/src/app \
&& adduser -S -h /home/docker -u ${USER_ID:-1000} -G docker docker \
&& chown -R docker /home/docker /usr/src/app \
&& apk add --no-cache --virtual=.build-deps \
autoconf==2.69-r3 \
g++==10.2.1_pre1-r3 \
make==4.3-r0 \
autoconf \
g++ \
make \
&& docker-php-ext-install -j"$(nproc)" pdo_mysql \
&& pecl install apcu-5.1.19 \
&& docker-php-ext-enable apcu \
Expand Down
3 changes: 1 addition & 2 deletions config/doctrine/orm/Species.orm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@
<field name="habitats" column="habitats" type="simple_array" nullable="false" unique="false" />
<field name="feeding" column="feeding" type="string" length="255" nullable="false" unique="false" />

<one-to-many
<one-to-many
field="dinosaurs"
target-entity="App\Entity\Dinosaur"
mapped-by="species" />
</entity>

</doctrine-mapping>

2 changes: 1 addition & 1 deletion src/Controller/AuthenticationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ public function login(AuthenticationUtils $authenticationUtils): Response
'controller_name' => 'AuthenticationController',
'last_username' => $lastUsername,
'error' => $error
]);
]);
}
}
2 changes: 1 addition & 1 deletion src/Entity/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function getId(): int

public function getUserIdentifier(): string
{
return $this->email;
return $this->email;
}

public function getRoles(): array
Expand Down
6 changes: 4 additions & 2 deletions templates/base.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
{% if app.user is not null %}
<li class="nav-item">
<a
<a
class="nav-link{% if app.request.get('_route') == 'app_list_dinosaurs' %} active{% endif %}"
aria-current="page"
href="{{ path('app_list_dinosaurs') }}"
Expand Down Expand Up @@ -91,15 +91,17 @@
</li>
{% endif %}
</ul>

{% if searchForm is defined %}
{{ form_start(searchForm, { 'attr': {'class': 'd-flex'}}) }}
{{ form_widget(searchForm.q) }}
{{ form_widget(searchForm.submit) }}
{{ form_end(searchForm) }}
{% endif %}

{% if app.user is not null %}
<span class="navbar-text ms-2">
{{app.user.userIdentifier}}
{{ app.user.userIdentifier }}
</span>
{% endif %}
</div>
Expand Down

0 comments on commit f2ea53d

Please sign in to comment.