Coder Social home page Coder Social logo

Comments (14)

ondics avatar ondics commented on July 27, 2024 1

If I remove the require-dev section and the symfonymailer to

"require": {
    "php": ">=7.4.0",
    "yiisoft/yii2": "~2.0.45",
    "yiisoft/yii2-apidoc": "~2.1.0"
},

then it works. But I need the yii2-symfonymailer!

from yii2-apidoc.

mtangoo avatar mtangoo commented on July 27, 2024

What happens if you remove Bootstrap5 extension from composer.json?

from yii2-apidoc.

ondics avatar ondics commented on July 27, 2024

Without Bootstrap5 this is the new composer.json require: section:

"require": {
    "php": ">=7.4.0",
    "yiisoft/yii2": "~2.0.45",
    "yiisoft/yii2-symfonymailer": "~2.0.3",
    "yiisoft/yii2-apidoc": "~2.1.0"
},

But these errors remain:

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 yiisoft/yii2-symfonymailer ~2.0.3 -> satisfiable by yiisoft/yii2-symfonymailer[2.0.3, 2.0.4].
    - yiisoft/yii2-apidoc[2.1.0, ..., 2.1.6] require phpdocumentor/reflection-docblock ^2.0.4 -> satisfiable by phpdocumentor/reflection-docblock[2.0.4, 2.0.5].
    - Conclusion: don't install phpdocumentor/reflection-docblock 2.0.5 (conflict analysis result)
    - Root composer.json requires yiisoft/yii2-apidoc ~2.1.0 -> satisfiable by yiisoft/yii2-apidoc[2.1.0, ..., 2.1.6].

from yii2-apidoc.

ondics avatar ondics commented on July 27, 2024

Next error: ./yii help api results in:

# ./yii help api
Exception 'yii\di\NotInstantiableException' with message 'Failed to instantiate component or class "yii\gii\Module".'

in /app/yii2-app-basic/vendor/yiisoft/yii2/di/Container.php:509
Caused by: Exception 'ReflectionException' with message 'Class "yii\gii\Module" does not exist'
in /app/yii2-app-basic/vendor/yiisoft/yii2/di/Container.php:507

Stack trace:
#0 /app/yii2-app-basic/vendor/yiisoft/yii2/di/Container.php(507): ReflectionClass->__construct('yii\\gii\\Module')
#1 /app/yii2-app-basic/vendor/yiisoft/yii2/di/Container.php(385): yii\di\Container->getDependencies('yii\\gii\\Module')
#2 /app/yii2-app-basic/vendor/yiisoft/yii2/di/Container.php(170): yii\di\Container->build('yii\\gii\\Module', Array, Array)
#3 /app/yii2-app-basic/vendor/yiisoft/yii2/BaseYii.php(365): yii\di\Container->get('yii\\gii\\Module', Array, Array)
#4 /app/yii2-app-basic/vendor/yiisoft/yii2/base/Module.php(445): yii\BaseYii::createObject(Array, Array)
#5 /app/yii2-app-basic/vendor/yiisoft/yii2/base/Application.php(313): yii\base\Module->getModule('gii')
#6 /app/yii2-app-basic/vendor/yiisoft/yii2/base/Application.php(271): yii\base\Application->bootstrap()
#7 /app/yii2-app-basic/vendor/yiisoft/yii2/console/Application.php(124): yii\base\Application->init()
#8 /app/yii2-app-basic/vendor/yiisoft/yii2/base/BaseObject.php(109): yii\console\Application->init()
#9 /app/yii2-app-basic/vendor/yiisoft/yii2/base/Application.php(204): yii\base\BaseObject->__construct(Array)
#10 /app/yii2-app-basic/vendor/yiisoft/yii2/console/Application.php(89): yii\base\Application->__construct(Array)
#11 /app/yii2-app-basic/yii(19): yii\console\Application->__construct(Array)
#12 {main}

from yii2-apidoc.

mtangoo avatar mtangoo commented on July 27, 2024

then it works. But I need the yii2-symfonymailer!

What happens if you change version of mailer from ~2.0.3 to ~3.0.0?

from yii2-apidoc.

mtangoo avatar mtangoo commented on July 27, 2024

Exception 'yii\di\NotInstantiableException' with message 'Failed to instantiate component or class "yii\gii\Module".'

Can you check if Gii module is defined in the console config?

from yii2-apidoc.

ondics avatar ondics commented on July 27, 2024

then it works. But I need the yii2-symfonymailer!

What happens if you change version of mailer from ~2.0.3 to ~3.0.0?

/app/yii2-app-basic# composer update
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 yiisoft/yii2-symfonymailer ~3.0.0 -> satisfiable by yiisoft/yii2-symfonymailer[3.0.0].
    - yiisoft/yii2-apidoc[2.1.0, ..., 2.1.6] require phpdocumentor/reflection-docblock ^2.0.4 -> satisfiable by phpdocumentor/reflection-docblock[2.0.4, 2.0.5].
    - Conclusion: don't install phpdocumentor/reflection-docblock 2.0.5 (conflict analysis result)
    - Root composer.json requires yiisoft/yii2-apidoc ~2.1.0 -> satisfiable by yiisoft/yii2-apidoc[2.1.0, ..., 2.1.6].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

from yii2-apidoc.

ondics avatar ondics commented on July 27, 2024

Exception 'yii\di\NotInstantiableException' with message 'Failed to instantiate component or class "yii\gii\Module".'

Can you check if Gii module is defined in the console config?

I'm using https://github.com/yiisoft/yii2-app-basic out of the box - Nothing modified in configs.

Do I have to modify config settings?

from yii2-apidoc.

mtangoo avatar mtangoo commented on July 27, 2024

I'm using https://github.com/yiisoft/yii2-app-basic out of the box - Nothing modified in configs.

I thought this was problem only in docker which is not set in my machine. I will install it from Basic and check it out. Sorry for what you are facing. It should just work

from yii2-apidoc.

mtangoo avatar mtangoo commented on July 27, 2024

Hi,
Please remove vendor directory and composer.lock
Change apidoc version to 3.0.6 i.e. "yiisoft/yii2-apidoc": "~3.0.6"
Run composer install

when completed then run ./vendor/bin/apidoc help

Then let me know if you get everything successful!

from yii2-apidoc.

ondics avatar ondics commented on July 27, 2024

Thx, seems to work.

I didn't know that I've to run ./vendor/bin/apidoc help.

I assumed apidoc can be called using ./yii command line executor. Maybe this should be clarified in the README.md

from yii2-apidoc.

mtangoo avatar mtangoo commented on July 27, 2024

I didn't know that I've to run ./vendor/bin/apidoc help.

apidoc installs a command-line tool for doing the tasks

from yii2-apidoc.

mtangoo avatar mtangoo commented on July 27, 2024

I will leave this open until doc is updated

from yii2-apidoc.

neoacevedo avatar neoacevedo commented on July 27, 2024

The issue comes with bootstrap5. Removed it from the requires section, apidoc can be installed.

This package has the dependency to yiisoft/yii2-bootstrap but if anyone need to install bootstrap5, then won't be able to install due to yii2-apidoc dependency.

from yii2-apidoc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.