Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [SF][Symfony][SF4][Symfony4] Błąd przy instalacji zależności z composer-a, The following exception probably indicates you have misconfigured DNS
damianooo
post 5.01.2024, 18:23:49
Post #1





Grupa: Zarejestrowani
Postów: 496
Pomógł: 2
Dołączył: 15.07.2011
Skąd: Katowice

Ostrzeżenie: (0%)
-----


Próbuję odpalić swój projekt na nowym komputerze z Windows 10 Pro.
Pobrałem projekt z Github'a i wykonuję polecenie:

composer install

Dostaję niestety poniższy błąd:

https://flex.symfony.com/versions.json: Coul
d not resolve host: flex.symfony.com


install [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--download-only] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-progress] [--no-install] [--audit] [--audit-format AUDIT-FORMAT] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [<packages>...]
">C:\xampp\htdocs\ligatyperow2>composer install
Deprecation Notice: Return type of Symfony\Flex\Response::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\xampp\htdocs\ligatyperow2\vendor\symfony\flex\src\Response.php:68
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
The following exception probably indicates you have misconfigured DNS resolver(s)

In CurlDownloader.php line 372:

curl error 6 while downloading https://flex.symfony.com/versions.json: Coul
d not resolve host: flex.symfony.com


install [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--download-only] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-progress] [--no-install] [--audit] [--audit-format AUDIT-FORMAT] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [<packages>...]



Korzystam z Xampp'a na którym mam PHP w wersji 8.2.1
Projekt PHP mam w wersji 4.4

Znalazłem w necie takie informacje:
https://symfony.com/blog/the-old-flex-infra...s-shutting-down
https://symfony.com/blog/upgrade-flex-on-yo...ymfony-projects

ale wykonując wskazane polecenie:
composer update symfony/flex --no-plugins --no-scripts
wyświetla mi info że moje zależności nie pasują pod wersję PHP 8.2.1:


C:\xampp\htdocs\ligatyperow2>composer update symfony/flex --no-plugins --no-scripts
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Root composer.json requires php ^7.1.3 but your php version (8.2.12) does not satisfy that requirement.
Problem 2
- stof/doctrine-extensions-bundle is locked to version v1.5.0 and an update of this package was not requested.
- stof/doctrine-extensions-bundle v1.5.0 requires php ^7.1.3 -> your php version (8.2.12) does not satisfy that requirement.
Problem 3
- symfony/asset is locked to version v4.3.11 and an update of this package was not requested.
- symfony/asset v4.3.11 requires php ^7.1.3 -> your php version (8.2.12) does not satisfy that requirement.
Problem 4
- symfony/console is locked to version v4.3.11 and an update of this package was not requested.
- symfony/console v4.3.11 requires php ^7.1.3 -> your php version (8.2.12) does not satisfy that requirement.




mój plik composer.json :


{
"type": "project",
"license": "proprietary",
"require": {
"php": "^7.1.3",
"ext-ctype": "*",
"ext-iconv": "*",
"sensio/framework-extra-bundle": "^5.1",
"stof/doctrine-extensions-bundle": "^1.3",
"symfony/asset": "4.3.*",
"symfony/console": "4.3.*",
"symfony/dotenv": "4.3.*",
"symfony/expression-language": "4.3.*",
"symfony/flex": "^1.3.1",
"symfony/form": "4.4.2",
"symfony/framework-bundle": "4.4.0",
"symfony/http-client": "4.4.*",
"symfony/intl": "4.4.*",
"symfony/monolog-bundle": "^3.1",
"symfony/orm-pack": "^1.0",
"symfony/process": "4.3.*",
"symfony/security-bundle": "4.4.0",
"symfony/serializer-pack": "*",
"symfony/swiftmailer-bundle": "^3.1",
"symfony/translation": "4.4.*",
"symfony/twig-bundle": "4.4.*",
"symfony/validator": "4.4.*",
"symfony/web-link": "4.3.*",
"symfony/yaml": "4.3.*"
},
"require-dev": {
"doctrine/doctrine-fixtures-bundle": "^3.4",
"symfony/debug-bundle": "^4.4",
"symfony/maker-bundle": "^1.12",
"symfony/phpunit-bridge": "^5.0",
"symfony/stopwatch": "^4.4",
"symfony/test-pack": "*",
"symfony/var-dumper": "^4.4",
"symfony/web-profiler-bundle": "^4.4.2",
"symfony/web-server-bundle": "4.3.*"
},
"config": {
"preferred-install": {
"*": "dist"
},
"sort-packages": true,
"allow-plugins": {
"symfony/flex": true
}
},
"autoload": {
"psr-4": {
"App\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"App\\Tests\\": "tests/"
}
},
"replace": {
"paragonie/random_compat": "2.*",
"symfony/polyfill-ctype": "*",
"symfony/polyfill-iconv": "*",
"symfony/polyfill-php71": "*",
"symfony/polyfill-php70": "*",
"symfony/polyfill-php56": "*"
},
"scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd"
},
"post-install-cmd": [
"@auto-scripts"
],
"post-update-cmd": [
"@auto-scripts"
]
},
"conflict": {
"symfony/symfony": "*"
},
"extra": {
"symfony": {
"allow-contrib": false,
"require": "4.4.2"
}
}
}




Prośba o podpowiedź jak to teraz rozwiązać żeby pójść dalej a więc uruchomić projekt lokalnie na kompie ?
PS. Dodam tylko że będę chciał w najbliższym czasie przenieść się na wersję 7 albo wcześniejszą ale nowszą stabilną wersję.


Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Tomplus
post 7.01.2024, 22:15:24
Post #2





Grupa: Zarejestrowani
Postów: 1 844
Pomógł: 227
Dołączył: 20.03.2005
Skąd: Będzin

Ostrzeżenie: (0%)
-----


Co do PHP w wersji starszej, wystarczy pobrać https://windows.php.net/downloads/releases/ wersję windows i tą odpalić composer bezpośrednio z exeka starszej wersji

Kod
php7.4/php.exe composer install

Projekt nadal może być odpalany na nowszej wersji php.

Oczywiście polecam, aby composer był aktualny pod php8

Swoją drogą, nie ma takiej domeny.
Kod
ping flex.symfony.com
Ping request could not find host flex.symfony.com. Please check the name and try again.
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 19.06.2024 - 08:48