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

Saturday, January 29, 2022

[FIXED] How do I add a custom file to the Composer to ignore when upgrading?

 January 29, 2022     composer-php, smarty     No comments   

Issue

I have installed smarty via the Composer, like below,

"require": 
  {
    "neitanod/forceutf8": "dev-master",
    "raven/raven": "0.7.1",
    "monolog/monolog": "1.7.*",
    "smarty/smarty": "3.1.19"
  }

However I have custom plugin that needs to be added to the smarty/plugin lib to be used with the website. So when I update composer to the upgrade the smarty it gives me an error. How do I add my custom plugin to the smarty via composer so that I dont have redo this again and again, ?


Solution

Don't keep your plugin anywhere in smarty's vendor directory. Put it somewhere sensible along with the rest of your application and use $smarty->addPluginsDir('path/to/your/custom/plugin/dir') instead.



Answered By - user3942918
  • 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