Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

strategy:
matrix:
php: [ '7.4', '8.0', '8.1', '8.2', '8.3' ]
php: [ '8.0', '8.1', '8.2', '8.3' ]

runs-on: ubuntu-latest

Expand Down
5 changes: 1 addition & 4 deletions Command/SshCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
class SshCommand extends Command
{

/** @var string */
protected static $defaultName = 'toolforge:ssh';

/** @var ReplicasClient */
protected $client;

Expand All @@ -38,7 +35,7 @@ class SshCommand extends Command
public function __construct(ReplicasClient $client)
{
$this->client = $client;
parent::__construct();
parent::__construct('toolforge:ssh');
}

/**
Expand Down
8 changes: 4 additions & 4 deletions Controller/AuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Session\Session;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;

class AuthController extends AbstractController
{

/**
* Redirect to Meta for Oauth authentication.
* @Route("/login", name="toolforge_login")
* @return RedirectResponse
*/
#[Route("/login", name:"toolforge_login")]
public function loginAction(Request $request, Client $oauthClient, Session $session): RedirectResponse
{
// Automatically log in a development user if defined.
Expand Down Expand Up @@ -53,10 +53,10 @@ public function loginAction(Request $request, Client $oauthClient, Session $sess

/**
* Receive authentication credentials back from the OAuth wiki.
* @Route("/oauth_callback", name="toolforge_oauth_callback")
* @param Request $request The HTTP request.
* @return RedirectResponse
*/
#[Route("/oauth_callback", name:"toolforge_oauth_callback")]
public function oauthCallbackAction(Request $request, Session $session, Client $client): RedirectResponse
{
// Give up if the required GET params or stored request token don't exist.
Expand Down Expand Up @@ -94,9 +94,9 @@ public function oauthCallbackAction(Request $request, Session $session, Client $

/**
* Log out the user and return to the homepage.
* @Route("/logout", name="toolforge_logout")
* @return RedirectResponse
*/
#[Route("/logout", name:"toolforge_logout")]
public function logoutAction(Session $session): RedirectResponse
{
$session->invalidate();
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Toolforge Bundle
================

A Symfony 4/5 bundle that provides some common parts of web-based tools in Wikimedia Toolforge.
A Symfony 5/6/7 bundle that provides some common parts of web-based tools in Wikimedia Toolforge.

Features:

Expand Down
2 changes: 1 addition & 1 deletion Resources/config/routes.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
toolforge_oauth:
resource: "@ToolforgeBundle/Controller/"
type: annotation
type: attribute