contributte recaptcha extensions
- admin@easyweb4u.cz
- Backer | 146
Ahoj, stáhl jsem si z githubu Contributte Recaptchu (přes composer to hlásilo chybu). Nicméně: v config.neon jsem nastavil
extensions:
recaptcha: Contributte\ReCaptcha\DI\ReCaptchaExtension
do složky vendor jsem vložil kódy v této struktuře: contributte/recaptcha/src/DI/ReCaptchaExtension.php
Výsledek je
Nette\DI\InvalidConfigurationException
Extension ‚Contributte\ReCaptcha\DI\ReCaptchaExtension‘ not found or is not Nette\DI\CompilerExtension descendant.
Jak se to dělá?
Editoval admin@easyweb4u.cz (7. 3. 2020 19:31)
- admin@easyweb4u.cz
- Backer | 146
Mysteria napsal(a):
Jakou chybu ti to hlásilo při instalaci? Nemůžeš si jen tak nakopírovat soubory do vendoru, protože ti tam bude chybět jejich autoloading, který poskytuje Composer.
No hlásilo to problém s Nette/Utils 3.1 (tuším)
V composer.json toho modulu je
„autoload“: {
„psr-4“: {
„Contributte\\ReCaptcha\\“: „src“
}
},
- admin@easyweb4u.cz
- Backer | 146
Mysteria napsal(a):
Jenže to bude fungovat jenom v případě, že to nainstaluješ přes Composer. Když to tam zkopíruješ ručně tak o tom Composer neví. Co přesně to píše za chybu?
Your requirements could not be resolved to an installable set of packages.
Problem 1
– Installation request for contributte/recaptcha ^3.2 → satisfiable by
contributte/recaptcha[3.2.0].
– Conclusion: remove nette/utils v3.1.0
– Conclusion: don't install nette/utils v3.1.0
– contributte/recaptcha 3.2.0 requires nette/utils ~3.0.0 → satisfiable
by nette/utils[v3.0.0, v3.0.1, v3.0.2, v3.0.3].
– Can only install one of: nette/utils[v3.0.0, v3.1.0].
– Can only install one of: nette/utils[v3.0.1, v3.1.0].
– Can only install one of: nette/utils[v3.0.2, v3.1.0].
– Can only install one of: nette/utils[v3.0.3, v3.1.0].
– Installation request for nette/utils (locked at v3.1.0, required as ^3.0)
→ satisfiable by nette/utils[v3.1.0].
Installation failed, reverting ./composer.json to its original content.
- admin@easyweb4u.cz
- Backer | 146
Felix napsal(a):
Ahoj @adminaeasyweb4ucz. Hodil by jsi sem prosim obsah
composer.json
z rootu projektu?
<?php
{
"name": "nette/web-project",
"description": "Nette: Standard Web Project",
"keywords": ["nette"],
"type": "project",
"license": ["MIT", "BSD-3-Clause", "GPL-2.0", "GPL-3.0"],
"require": {
"php": ">= 7.1",
"nette/application": "^3.0",
"nette/bootstrap": "^3.0",
"nette/caching": "^3.0",
"nette/database": "^3.0",
"nette/di": "^3.0",
"nette/finder": "^2.5",
"nette/forms": "^3.0",
"nette/http": "^3.0",
"nette/mail": "^3.0",
"nette/robot-loader": "^3.0",
"nette/security": "^3.0",
"nette/utils": "^3.0",
"latte/latte": "^2.5",
"tracy/tracy": "^2.6"
},
"require-dev": {
"nette/tester": "^2.0"
},
"autoload": {
"classmap": ["app/Bootstrap.php"]
},
"minimum-stability": "stable"
}
?>
Editoval admin@easyweb4u.cz (8. 3. 2020 9:35)