Answers.Body: <p>Composer symlinked the plugin from its physical directory into craft's vendor directory. The plugin directory as a result of this was not mounted into the docker container. Thus, craft was not able to locate the plugin as it wasn't mounted into my docker container. All I did to fix this was move the project(plugin) into craft's vendor director.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-25T09:16:13.347Z
Answers.LastActivityDate: 2020-02-25T09:16:13.347Z
Answers.UserDisplayName: Segun Ogundipe
Body: <p>I am working on a plugin in Craft:3.4. I get this error while trying to install the plugin in the CP.</p>
  <pre class="lang-php prettyprint-override"><code>yii\base\ErrorException: include(/app/vendor/composer/../wittsstratts/craft-company/src/Company.php): failed to open stream: No such file or directory in /app/vendor/composer/ClassLoader.php:444
  Stack trace:
  #0 /app/vendor/craftcms/cms/src/web/ErrorHandler.php(74): yii\base\ErrorHandler-&gt;handleError(2, 'include(/app/ve...', '/app/vendor/com...', 444)
  #1 /app/vendor/composer/ClassLoader.php(444): craft\web\ErrorHandler-&gt;handleError(2, 'include(/app/ve...', '/app/vendor/com...', 444, Array)
  #2 /app/vendor/composer/ClassLoader.php(444): include()
  #3 /app/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile('/app/vendor/com...')
  #4 [internal function]: Composer\Autoload\ClassLoader-&gt;loadClass('wittsstratts\\co...')
  #5 [internal function]: spl_autoload_call('wittsstratts\\co...')
  #6 /app/vendor/craftcms/cms/src/services/Plugins.php(873): is_subclass_of('wittsstratts\\co...', 'craft\\base\\Plug...')
  #7 /app/vendor/craftcms/cms/src/services/Plugins.php(478): craft\services\Plugins-&gt;createPlugin('company')
  #8 /app/vendor/craftcms/cms/src/controllers/PluginsController.php(50): craft\services\Plugins-&gt;installPlugin('company', NULL)
  #9 [internal function]: craft\controllers\PluginsController-&gt;actionInstallPlugin()
  #10 /app/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
  #11 /app/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction-&gt;runWithParams(Array)
  #12 /app/vendor/craftcms/cms/src/web/Controller.php(178): yii\base\Controller-&gt;runAction('install-plugin', Array)
  #13 /app/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller-&gt;runAction('install-plugin', Array)
  #14 /app/vendor/craftcms/cms/src/web/Application.php(290): yii\base\Module-&gt;runAction('plugins/install...', Array)
  #15 /app/vendor/craftcms/cms/src/web/Application.php(558): craft\web\Application-&gt;runAction('plugins/install...', Array)
  #16 /app/vendor/craftcms/cms/src/web/Application.php(269): craft\web\Application-&gt;_processActionRequest(Object(craft\web\Request))
  #17 /app/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application-&gt;handleRequest(Object(craft\web\Request))
  #18 /app/web/index.php(21): yii\base\Application-&gt;run()
  #19 {main}
  
  </code></pre>
  <p>This question is related to <a href="https://craftcms.stackexchange.com/questions/23466/php-warning-with-composer-on-macos-high-sierra-failed-to-open-stream">this</a> but with a different setup.</p>
  <p>Tools:</p>
  <blockquote>
  <p>Docker:19.03.5</p>
  <p>Composer:1.10-dev</p>
  </blockquote>
  <p>This might help anyone facing this same issue.</p>
  <p>I found the reason for the error was because I was using docker. Composer symlinks the plugin from its physical directory into craft's vendor directory. The plugin directory as a result of this was not mounted into docker container. Thus, craft was not able to locate the plugin directory. All I did to fix this was move the project(plugin) into craft's vendor director.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-24T15:26:55.787Z
Comments.Text: Please can you share the content of your composer.json file? It looks like one of your dependencies (perhaps a custom plugin or module) is not found.
Comments.UserDisplayName: Romain P.
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-24T17:22:24.423Z
Comments.Text: @RomainPoirier, I was able to fix it. I've updated my question. Kindly check. Thank you
Comments.UserDisplayName: Segun Ogundipe
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-24T22:26:22.920Z
Comments.Text: Could you share your update as an official answer, @SegunOgundipe?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-25T09:16:42.417Z
Comments.Text: Done. @BradBell
Comments.UserDisplayName: Segun Ogundipe
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-25T23:10:46.783Z
Comments.Text: Thanks!! @SegunOgundipe
Comments.UserDisplayName: Brad Bell
Tags: <plugin-development><craft3>
Title: PHP warning with composer on MacOS Mojave: Failed to open stream: No such file or directory
ThreadText: # PHP warning with composer on MacOS Mojave: Failed to open stream: No such file or directory
  
  (Asked by: username_0 on 2020-02-21)
  
  I am working on a plugin in Craft:3.4. I get this error while trying to install the plugin in the CP.
  
  ```php
  yii\base\ErrorException: include(/app/vendor/composer/../wittsstratts/craft-company/src/Company.php): failed to open stream: No such file or directory in /app/vendor/composer/ClassLoader.php:444
  Stack trace:
  #0 /app/vendor/craftcms/cms/src/web/ErrorHandler.php(74): yii\base\ErrorHandler->handleError(2, 'include(/app/ve...', '/app/vendor/com...', 444)
  #1 /app/vendor/composer/ClassLoader.php(444): craft\web\ErrorHandler->handleError(2, 'include(/app/ve...', '/app/vendor/com...', 444, Array)
  #2 /app/vendor/composer/ClassLoader.php(444): include()
  #3 /app/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile('/app/vendor/com...')
  #4 [internal function]: Composer\Autoload\ClassLoader->loadClass('wittsstratts\\co...')
  #5 [internal function]: spl_autoload_call('wittsstratts\\co...')
  #6 /app/vendor/craftcms/cms/src/services/Plugins.php(873): is_subclass_of('wittsstratts\\co...', 'craft\\base\\Plug...')
  #7 /app/vendor/craftcms/cms/src/services/Plugins.php(478): craft\services\Plugins->createPlugin('company')
  #8 /app/vendor/craftcms/cms/src/controllers/PluginsController.php(50): craft\services\Plugins->installPlugin('company', NULL)
  #9 [internal function]: craft\controllers\PluginsController->actionInstallPlugin()
  #10 /app/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
  #11 /app/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
  #12 /app/vendor/craftcms/cms/src/web/Controller.php(178): yii\base\Controller->runAction('install-plugin', Array)
  #13 /app/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('install-plugin', Array)
  #14 /app/vendor/craftcms/cms/src/web/Application.php(290): yii\base\Module->runAction('plugins/install...', Array)
  #15 /app/vendor/craftcms/cms/src/web/Application.php(558): craft\web\Application->runAction('plugins/install...', Array)
  #16 /app/vendor/craftcms/cms/src/web/Application.php(269): craft\web\Application->_processActionRequest(Object(craft\web\Request))
  #17 /app/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
  #18 /app/web/index.php(21): yii\base\Application->run()
  #19 {main}
  
  ```
  
  This question is related to [this](https://craftcms.stackexchange.com/questions/23466/php-warning-with-composer-on-macos-high-sierra-failed-to-open-stream) but with a different setup.
  
  Tools:
  
  > Docker:19.03.5
  >
  > Composer:1.10-dev
  
  This might help anyone facing this same issue.
  
  I found the reason for the error was because I was using docker. Composer symlinks the plugin from its physical directory into craft's vendor directory. The plugin directory as a result of this was not mounted into docker container. Thus, craft was not able to locate the plugin directory. All I did to fix this was move the project(plugin) into craft's vendor director.
  
  **Tags:** plugin-development, craft3
  
  > **Comments:**
  > **username_1**: Please can you share the content of your composer.json file? It looks like one of your dependencies (perhaps a custom plugin or module) is not found.  
  > **username_0**: @RomainPoirier, I was able to fix it. I've updated my question. Kindly check. Thank you  
  > **username_2**: Could you share your update as an official answer, @username_0?  
  > **username_0**: Done. @username_2  
  > **username_2**: Thanks!! @username_0  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2020-02-25. Score: 1 | Accepted answer
  
  Composer symlinked the plugin from its physical directory into craft's vendor directory. The plugin directory as a result of this was not mounted into the docker container. Thus, craft was not able to locate the plugin as it wasn't mounted into my docker container. All I did to fix this was move the project(plugin) into craft's vendor director.
  
  
  ---
  
  