PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Saturday, January 29, 2022

[FIXED] PHP Composer dependency of library

 January 29, 2022     composer-php, php     No comments   

Issue

I'm developing a PHP-App using composer. Now I need a PHP-Libary, which is also developed by me. Inside the IDE there is no problem using the library-classes. But when the app is running inside Apache2 I need to install the library via "composer update". But when I change some library-class I always need to reinstall the new code via composer. Before that I have to push my changes to the SCM. Is there a way to simplify this process during development?


Solution

After trying out symlinks, the solution for me is symlinking the dependend library with ln -s TARGET NAME. Adding the dependency to composer.json is for generating the classmaps and running without errors after deleting the symlink. It works fine. Also a "composer update" is working without overriding the symlink. New classes are found immedeately without doing the whole process described in the question.



Answered By - terbach
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing