Skip to content

6.0.0-beta.0

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 27 Jul 13:12
078a0ea

⚠️ This is a beta release. It moves the bundle onto auth0-php v9, which rewrites the Management API. The Authentication API is unchanged. Please consult the 5.x to 6.x Upgrade Guide before upgrading.

🚀 What's New

This release makes the Auth0 Symfony SDK compatible with auth0-php v9. The bundle wraps the Authentication API, which is unchanged in v9, so authentication flows require no changes. The one source-level addition is a new, idiomatic entry point for the rewritten Management API.

✨ Highlights

  • 🔑 New getManagement() accessor - Service::getManagement() returns a ManagementClient wrapper built from your existing bundle configuration (domain, client_id, client_secret), with automatic OAuth 2.0 client credentials token management and PSR-6 caching
  • 🏗️ auth0-php v9 Management API - Strongly-typed requests and responses, sub-clients accessed as properties ($client->users->list()), and built-in Pager<T> pagination, all surfaced through the bundle
  • 🛡️ Authentication API unchanged - The authenticator, authorizer, user provider, session store, and backchannel logout controller behave exactly as in 5.x

🔄 What's Changed

The Authentication surface is completely unchanged. Login, logout, callback, and token handling work exactly as before.

The Management API entry point has changed:

Area 5.x 6.x
Entry point $auth0->getSdk()->management() $auth0->getManagement()
Sub-client access ->users()->getAll() ->users->list()
Request params Associative arrays Typed classes (ListUsersRequestParameters)
Responses ResponseInterface + HttpResponse::decodeContent() Typed objects ($user->getEmail())
Pagination HttpResponsePaginator foreach ($pager as $user)

getSdk()->management() is non-functional with auth0-php v9 and throws a TypeError. Use getManagement() instead.

📦 Installation

composer require auth0/symfony:6.0.0-beta.0

🔧 Quick Start

use Auth0\SDK\API\Management\Users\Requests\ListUsersRequestParameters;
use Auth0\Symfony\Service;
use Symfony\Component\DependencyInjection\Attribute\Autowire;

// The bundle registers its service under the id `auth0`, so autowire it by id.
public function __construct(
    #[Autowire(service: 'auth0')]
    private Service $auth0,
) {
}

$management = $this->auth0->getManagement();

$users = $management->users->list(
    new ListUsersRequestParameters(['perPage' => 25])
);

foreach ($users as $user) {
    echo $user->getEmail();
}

⚠️ Breaking Changes

  • Bumped the auth0/auth0-php dependency from ^8.19 to ^9.0
  • Raised the minimum PHP version from 8.1 to 8.2
  • getSdk()->management() is non-functional with auth0-php v9; use the new getManagement() accessor instead

📚 Resources

🙏 Feedback

This is a beta release - we would love your feedback! Please open an issue if you encounter any problems or have suggestions.