Closed mariano-gomez closed 2 years ago
Hey @mariano-gomez 👋 Can you run composer show -i
from your project directory and share the output?
Sure:
asm89/stack-cors v2.1.1 Cross-origin resource sharing library and stack middleware auth0/auth0-php 7.9.2 Auth0 PHP SDK. auth0/login 6.5.0 Laravel plugin that helps authenticate with the Auth0 service auth0/php-jwt 3.3.4 A simple library to work with JSON Web Token and JSON Web Signature brick/math 0.9.3 Arbitrary-precision arithmetic library dflydev/dot-access-data v3.0.1 Given a deep data structure, access data by dot notation. doctrine/inflector 2.0.4 PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of wo... doctrine/instantiator 1.4.1 A small, lightweight utility to instantiate objects in PHP without invoking their constructors doctrine/lexer 1.2.3 PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers. dragonmantank/cron-expression v3.3.1 CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due egulias/email-validator 2.1.25 A library for validating emails against several RFCs facade/flare-client-php 1.9.1 Send PHP errors to Flare facade/ignition 2.17.5 A beautiful error page for Laravel applications. facade/ignition-contracts 1.0.2 Solution contracts for Ignition fakerphp/faker v1.19.0 Faker is a PHP library that generates fake data for you. filp/whoops 2.14.5 php error handling for cool kids fruitcake/laravel-cors v2.2.0 Adds CORS (Cross-Origin Resource Sharing) headers support in your Laravel application graham-campbell/result-type v1.0.4 An Implementation Of The Result Type guzzlehttp/guzzle 7.4.1 Guzzle is a PHP HTTP client library guzzlehttp/promises 1.5.1 Guzzle promises library guzzlehttp/psr7 1.8.3 PSR-7 message implementation that also provides common utility methods hamcrest/hamcrest-php v2.0.1 This is the PHP port of Hamcrest Matchers laravel/framework v8.83.5 The Laravel Framework. laravel/sail v1.13.7 Docker files for running a basic Laravel application. laravel/sanctum v2.14.2 Laravel Sanctum provides a featherweight authentication system for SPAs and simple APIs. laravel/serializable-closure v1.1.1 Laravel Serializable Closure provides an easy and secure way to serialize closures in PHP. laravel/tinker v2.7.1 Powerful REPL for the Laravel framework. league/commonmark 2.2.3 Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM) league/config v1.1.1 Define configuration arrays with strict schemas and access values with dot notation league/flysystem 1.1.9 Filesystem abstraction: Many filesystems, one API. league/mime-type-detection 1.9.0 Mime-type detection for Flysystem mockery/mockery 1.5.0 Mockery is a simple yet flexible PHP mock object framework monolog/monolog 2.4.0 Sends your logs to files, sockets, inboxes, databases and various web services myclabs/deep-copy 1.11.0 Create deep copies (clones) of your objects nesbot/carbon 2.57.0 An API extension for DateTime that supports 281 different languages. nette/schema v1.2.2 � Nette Schema: validating data structures against a given Schema. nette/utils v3.2.7 � Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or str... nikic/php-parser v4.13.2 A PHP parser written in PHP nunomaduro/collision v5.11.0 Cli error handling for console/command-line PHP applications. opis/closure 3.6.3 A library that can be used to serialize closures (anonymous functions) and arbitrary objects. phar-io/manifest 2.0.3 Component for reading phar.io manifest information from a PHP Archive (PHAR) phar-io/version 3.2.1 Library for handling version information and constraints phpdocumentor/reflection-common 2.2.0 Common reflection classes used by phpdocumentor to reflect the code structure phpdocumentor/reflection-docblock 5.3.0 With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBl... phpdocumentor/type-resolver 1.6.0 A PSR-5 based resolver of Class names, Types and Structural Element Names phpoption/phpoption 1.8.1 Option Type for PHP phpspec/prophecy v1.15.0 Highly opinionated mocking framework for PHP 5.3+ phpunit/php-code-coverage 9.2.15 Library that provides collection, processing, and rendering functionality for PHP code coverage information. phpunit/php-file-iterator 3.0.6 FilterIterator implementation that filters files based on a list of suffixes. phpunit/php-invoker 3.1.1 Invoke callables with a timeout phpunit/php-text-template 2.0.4 Simple template engine. phpunit/php-timer 5.0.3 Utility class for timing phpunit/phpunit 9.5.19 The PHP Unit Testing framework. psr/container 1.1.2 Common Container Interface (PHP FIG PSR-11) psr/event-dispatcher 1.0.0 Standard interfaces for event handling. psr/http-client 1.0.1 Common interface for HTTP clients psr/http-message 1.0.1 Common interface for HTTP messages psr/log 2.0.0 Common interface for logging libraries psr/simple-cache 1.0.1 Common interfaces for simple caching psy/psysh v0.11.2 An interactive shell for modern PHP. ralouphie/getallheaders 3.0.3 A polyfill for getallheaders. ramsey/collection 1.2.2 A PHP library for representing and manipulating collections. ramsey/uuid 4.2.3 A PHP library for generating and working with universally unique identifiers (UUIDs). sebastian/cli-parser 1.0.1 Library for parsing CLI options sebastian/code-unit 1.0.8 Collection of value objects that represent the PHP code units sebastian/code-unit-reverse-lookup 2.0.3 Looks up which function or method a line of code belongs to sebastian/comparator 4.0.6 Provides the functionality to compare PHP values for equality sebastian/complexity 2.0.2 Library for calculating the complexity of PHP code units sebastian/diff 4.0.4 Diff implementation sebastian/environment 5.1.3 Provides functionality to handle HHVM/PHP environments sebastian/exporter 4.0.4 Provides the functionality to export PHP variables for visualization sebastian/global-state 5.0.5 Snapshotting of global state sebastian/lines-of-code 1.0.3 Library for counting the lines of code in PHP source code sebastian/object-enumerator 4.0.4 Traverses array structures and object graphs to enumerate all referenced objects sebastian/object-reflector 2.0.4 Allows reflection of object attributes, including inherited and non-public ones sebastian/recursion-context 4.0.4 Provides functionality to recursively process PHP variables sebastian/resource-operations 3.0.3 Provides a list of PHP built-in functions that operate on resources sebastian/type 3.0.0 Collection of value objects that represent the types of the PHP type system sebastian/version 3.0.2 Library that helps with managing the version number of Git-hosted PHP projects swiftmailer/swiftmailer v6.3.0 Swiftmailer, free feature-rich PHP mailer symfony/console v5.4.5 Eases the creation of beautiful and testable command line interfaces symfony/css-selector v6.0.3 Converts CSS selectors to XPath expressions symfony/deprecation-contracts v3.0.0 A generic function and convention to trigger deprecation notices symfony/error-handler v5.4.3 Provides tools to manage errors and ease debugging PHP code symfony/event-dispatcher v6.0.3 Provides tools that allow your application components to communicate with each other by dispatching events and listening to them symfony/event-dispatcher-contracts v3.0.0 Generic abstractions related to dispatching event symfony/finder v5.4.3 Finds files and directories via an intuitive fluent interface symfony/http-foundation v5.4.6 Defines an object-oriented layer for the HTTP specification symfony/http-kernel v5.4.6 Provides a structured process for converting a Request into a Response symfony/mime v5.4.3 Allows manipulating MIME messages symfony/polyfill-ctype v1.25.0 Symfony polyfill for ctype functions symfony/polyfill-iconv v1.25.0 Symfony polyfill for the Iconv extension symfony/polyfill-intl-grapheme v1.25.0 Symfony polyfill for intl's grapheme_* functions symfony/polyfill-intl-idn v1.25.0 Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions symfony/polyfill-intl-normalizer v1.25.0 Symfony polyfill for intl's Normalizer class and related functions symfony/polyfill-mbstring v1.25.0 Symfony polyfill for the Mbstring extension symfony/polyfill-php72 v1.25.0 Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions symfony/polyfill-php73 v1.25.0 Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions symfony/polyfill-php80 v1.25.0 Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions symfony/polyfill-php81 v1.25.0 Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions symfony/process v5.4.5 Executes commands in sub-processes symfony/routing v5.4.3 Maps an HTTP request to a set of configuration variables symfony/service-contracts v2.4.1 Generic abstractions related to writing services symfony/string v6.0.3 Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way symfony/translation v6.0.6 Provides tools to internationalize your application symfony/translation-contracts v3.0.0 Generic abstractions related to translation symfony/var-dumper v5.4.6 Provides mechanisms for walking through any arbitrary PHP variable theseer/tokenizer 1.2.1 A small library for converting tokenized PHP source code into XML and potentially other formats tijsverkoyen/css-to-inline-styles 2.2.4 CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when y... vlucas/phpdotenv v5.4.1 Loads environment variables from
.envto
getenv(),
$_ENVand
$_SERVERautomagically. voku/portable-ascii 1.6.1 Portable ASCII library - performance optimized (ascii) string functions for php. webmozart/assert 1.10.0 Assertions to validate method input/output with nice error messages.
I removed the entire /vendor folder, re-installed everything (php composer install), and it works ok. Previously, i solved it by changing Psr7\build_query($params)
with Psr7\Query::build($params)
in vendor/auth0/auth0-php/src/API/Authentication.php::get_authorize_link()
(in case anyone else has the same problem)
Hey @mariano-gomez 👋 Thanks, glad you got it sorted! We don't use build_query()
in the underlying SDK anymore, so it sounds like you had got an old version of the SDK installed somehow. A composer update
would have resolved it as well.
SDK Version
6.5
PHP Version
PHP 8.1
Composer Version
2.x
What happened?
I've followed the tutorial in this page: https://auth0.com/docs/quickstart/webapp/laravel/01-login#install-and-configure-laravel-8 step by step, and when i try to access to http://localhost:8000/login, i get the error Call to undefined function GuzzleHttp\Psr7\build_query()
How can we reproduce this issue?
See what i mention in "what happened"
Additional context
composer.json file: { "name": "laravel/laravel", "type": "project", "description": "The Laravel Framework.", "keywords": ["framework", "laravel"], "license": "MIT", "require": { "php": "^7.3|^8.0", "auth0/login": "^6.5", "fruitcake/laravel-cors": "^2.0", "guzzlehttp/guzzle": "^7.0.1", "laravel/framework": "^8.75", "laravel/sanctum": "^2.11", "laravel/tinker": "^2.5" }, "require-dev": { "facade/ignition": "^2.5", "fakerphp/faker": "^1.9.1", "laravel/sail": "^1.0.1", "mockery/mockery": "^1.4.4", "nunomaduro/collision": "^5.10", "phpunit/phpunit": "^9.5.10" }, "autoload": { "psr-4": { "App\": "app/", "Database\Factories\": "database/factories/", "Database\Seeders\": "database/seeders/" } }, "autoload-dev": { "psr-4": { "Tests\": "tests/" } }, "scripts": { "post-autoload-dump": [ "Illuminate\Foundation\ComposerScripts::postAutoloadDump", "@php artisan package:discover --ansi" ], "post-update-cmd": [ "@php artisan vendor:publish --tag=laravel-assets --ansi --force" ], "post-root-package-install": [ "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" ], "post-create-project-cmd": [ "@php artisan key:generate --ansi" ] }, "extra": { "laravel": { "dont-discover": [] } }, "config": { "optimize-autoloader": true, "preferred-install": "dist", "sort-packages": true }, "minimum-stability": "dev", "prefer-stable": true }