Skip to content

Commit

Permalink
Update deps, migrate to symfony 7.1 (#1482)
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek authored Nov 7, 2024
1 parent 5ce8077 commit dc561cf
Show file tree
Hide file tree
Showing 7 changed files with 1,224 additions and 1,110 deletions.
2,313 changes: 1,215 additions & 1,098 deletions composer.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion config/packages/doctrine.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ doctrine:
alias: App
controller_resolver:
enabled: false
auto_mapping: true
auto_mapping: false

when@test:
doctrine:
Expand Down
3 changes: 2 additions & 1 deletion config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,5 @@ services:
Symfony\Component\HttpFoundation\Session\Storage\Handler\RedisSessionHandler:
arguments: ['@snc_redis.cache', {prefix: 'sess:', ttl: 3600}]

Symfony\Component\HttpClient\NoPrivateNetworkHttpClient: ~
Symfony\Component\HttpClient\NoPrivateNetworkHttpClient:
autoconfigure: false
4 changes: 2 additions & 2 deletions src/Controller/WebController.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ public function searchApi(Request $req, Algolia $algolia): JsonResponse

try {
$query = new Query(
$req->query->has('q') ? $req->query->get('q') : $req->query->get('query', ''),
$req->query->has('q') ? $req->query->getString('q') : $req->query->getString('query'),
(array) ($req->query->all()['tags'] ?? []),
$req->query->get('type', ''),
$req->query->getString('type', ''),
$req->query->getInt('per_page', 15),
$req->query->getInt('page', 1)
);
Expand Down
2 changes: 1 addition & 1 deletion src/Logger/LogIdProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function reset(): void
$this->jobId = null;
}

public function __invoke(LogRecord $record)
public function __invoke(LogRecord $record): LogRecord
{
if ($this->jobId !== null) {
$record->extra['job_id'] = $this->jobId;
Expand Down
4 changes: 1 addition & 3 deletions templates/package/stats_base.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@
<div class="row">
<div class="col-xs-12 package">
<div class="package-header">
{% apply spaceless %}
<h2 class="title">
<a href="{{ path("view_package", {name: package.name}) }}">{{ package.name }}</a> statistics
<small class="header-menu-item {% if app.request.attributes.get('_route') == 'view_package_stats' %}active{% endif %}"><a href="{{ path('view_package_stats', {name: package.name}) }}">Package Installs</a></small>
<small class="header-menu-item {% if app.request.attributes.get('_route') == 'view_package_stats' %}active{% endif %}"><a href="{{ path('view_package_stats', {name: package.name}) }}">Package Installs</a></small>{#--#}
<small class="header-menu-item {% if app.request.attributes.get('_route') == 'view_package_php_stats' %}active{% endif %}"><a href="{{ path('view_package_php_stats', {name: package.name}) }}">PHP Versions</a></small>
</h2>
{% endapply %}
</div>
</div>
</div>
Expand Down
6 changes: 2 additions & 4 deletions templates/web/stats_base.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@
{% block content %}
{% set packageCount = 0 %}

{% apply spaceless %}
<h2 class="title">
{{ 'statistics.title'|trans }}
<small class="header-menu-item {% if app.request.attributes.get('_route') == 'stats' %}active{% endif %}"><a href="{{ path('stats') }}">Package Installs</a></small>
<small class="header-menu-item {% if app.request.attributes.get('_route') == 'php_stats' and type|default(false) == 'php' %}active{% endif %}"><a href="{{ path('php_stats') }}">PHP Versions</a></small>
<small class="header-menu-item {% if app.request.attributes.get('_route') == 'stats' %}active{% endif %}"><a href="{{ path('stats') }}">Package Installs</a></small>{#--#}
<small class="header-menu-item {% if app.request.attributes.get('_route') == 'php_stats' and type|default(false) == 'php' %}active{% endif %}"><a href="{{ path('php_stats') }}">PHP Versions</a></small>{#--#}
{# <small class="header-menu-item {% if app.request.attributes.get('_route') == 'php_stats' and type|default(false) == 'phpplatform' %}active{% endif %}"><a href="{{ path('php_stats', {platform: 1}) }}">Platform PHP Versions</a></small> #}
</h2>
{% endapply %}
{% endblock %}

0 comments on commit dc561cf

Please sign in to comment.