I've been trying to create and setup a project under Symfony 4.4 for a few hours now but it seems like i'm getting a problem when i'm downloading bundles or installing things (For example, Doctrine or FOSrest).
Multiple times in tutorials I've seen that all the people seemed to have files such as "Doctrine.yaml" which are supposed to be stored in config/packages. And it seems like these configuration files are automatically created upon downloading the files associated to it.
But in my case there's simply... nothing, I have to create manually all the files, and i'm not sure if that's normal and if not, how can I resolve this problem ?
And it seems like these configuration files are automatically created upon downloading the files associated to it.
You're looking for the Symfony recipes which allow composer packages via Symfony/flex to automate common tasks when you install a new bundle.
A more detailed explanation regarding how does flex work you'll find in the official documentation here when it was first introduced in Symfony 3.4, but note that is not maintained anymore for this version.
I corrected it. I simply was being too dumb. When I created the git repository, I did the installation wrong and I didn't immediatly notice that I was downloading things into the wrong repository.
Thanks for all the answers!
Related
I try to find and also to delete all the unused libraries in a project. For example I have a folder lib/ with lot of other folder which are the famous libraries. I want to know how I can identify which libraries are not used.
I asked the same question here but the only response I received suggests to me to check each file one by one ...
Can you help me?
I don't think that is possible, as some libraries may be lazy loaded depending on some internal state of your application.
So even if you could somehow find all strong typed references inspecting the code, you have no way of finding out if a library is loaded via magic methods, custom class loaders, dynamically generated include or require statement, eval-ed code and so on.
Without having tests with 95%+ coverage for your non-library code, it is very risky to remove anything from your lib folder. You code may appear to run fine, but still fail in some edge cases.
There's an open source project that can help you to do that:
https://github.com/composer-unused/composer-unused
Installation
composer require composer-unused/composer-unused-plugin
Usage
composer unused
And if you want to use it inside phpstorm, you can look at their composer documentation: https://www.jetbrains.com/help/phpstorm/using-the-composer-dependency-manager.html#create-and-run-composer-scripts
I'm new to developing with Meteor and node-based apps.
I intend to create a PR for a problem i noticed in Rocket.Chat.
I git cloned the Rocket.Chat dev branch and made a change to a certain file:
https://github.com/RocketChat/Rocket.Chat/blob/develop/packages/rocketchat-oembed/client/oembedImageWidget.html
After that i ran the build-script successfully. My build started, but the change is not included.
Using the Chrome Dev Tools to inspect the change, i still see the original unchanged code.
I know it's a rather generic question and i'm sure the solution is kind of stupid, but any idea why ?
Thank you.
Kind regards
It looks like the file you modified is in the packages directory. This is dealt with differently.
Check the .meteor/packages files to see if this package is referenced, if it is, then it will install the package from the atmosphere package management system.
Here the steps required to make your changes work...
1) Edit the .meteor/packages file and change the reference to rocketchat:oembed to be simply oembed
2) Edit the file packages/rocketchat-oembed/package.js and do the same thing, change rocketchat:oembed to be simply oembed
Package.describe({
name: 'oembed',
version: '0.0.1',
summary: 'Message pre-processor that insert oEmbed widget in template',
git: ''
});
I think you can leave the directory names as is.
Meteor will now use your local package instead of going out to get the published version of it
In addition to #Mikkel's answer: I think you don't have to change package name, but just change its version. That should be enough for Meteor to rebuild this package from its source and you won't have any dependency issues.
I cloned sylius/sylius. Everything runs fine so far.
But I have no clue, nor found in the docs, how i can install a translation for sylius.
At the moment there are only the keys visible in by Admin-Backend.
Any hint?
There are few ways how to solve your issue:
the right way
First all translations (except english) are done on crowdin
https://crowdin.com/project/sylius
Look there if your language is missing some translations and translate the missing strings.
These translated strings are merged to master every week, as of yesterday.
So when they will be merged just update your sylius installation with 'composer update'
the possible but not so great way
Another option, if you don't / can't wait. Copy the translation files inside your app/Resources//translations folder.
Add missing translations directly in the yaml files.
The keys for translation strings you can see in the debug panel, or by listing them with console command ...
These translation files are following standard way how symfony translates, strings, so for more information how to override translation you can look here
http://symfony.com/doc/current/book/translation.html
Please see answers and comments on https://stackoverflow.com/a/21989633/487878 . It will also lead you to https://github.com/Sylius/Sylius/issues/133, https://github.com/Sylius/Sylius/issues/794, https://github.com/Sylius/Sylius/issues/1080 . As I have not worked on Sylius translation I am not sure, but my belief is that you can copy the yml and keep on the app/Resources/translations as symfony is the underlying system. Good luck with your research.
I was able to do what I'm goin to describe in Fuse 6.1 but now in Fuse 6.2 I get an exception and it is not working anymore.
By following a tutorial, I build a "multi module" project that has a features component in order to install all the needed bundles.
I'm working on a fabric container with a child container.
I create a new profile and then from hawtio console I try to add the feature repository. (BTW I have the same problem if I use the terminal console)
The feature repository is added correctly (that's what fuse says at least) but when I enter the page to add any feature I see this in the log:
org.eclipse.aether.resolution.ArtifactResolutionException: Could not
find artifact it.mytria.demo:esercizio1-feature:xml:features:1.0.0 in
karaf-default
(file:C:/servers/fuse/system/)
Of course, it is right, since I never installed the bundle in that folder, but I have it in my local .m2/repository
Now, the question is, has anyone ever installed a custom feature in Jboss 6.2 and can help me get out from this situation?
The only solution I found is to manually copy the feature and all the custom bundled indicated by the feature in the "/system" folder, but I never had to do this in Fuse 6.1 so I don't like this solution at all.
Other thing, there is a conf file in Fuse 6.2 that has changed from Fuse 6.1, C:\servers\fuse\etc\io.fabric8.maven.cfg and it is the only file I found pointing to the system folder... but I'm afraid that if I add the .m2 folder here then Fuse will try to search there any bundle even those that has to be really taken from system folder.
So far I haven't find any other difference in the config file about maven repository.
There is any good guy out there that know how to make this thing work?
Please, if I missed some important information, let me know, I'll try my best to complete the question.
Thank you very much.
I installed a clean JbossFuse 6.2.0. Then from the hawtio console I just add the repository to the profile using
mvn:it.mytria.demo/esercizio1-feature/1.0.0/xml/features
and it worked.
So... I have no idea what went wrong the first time. I made no changes to the projects code or pom configuration of the bundles.
I'm developing an application, using Symfony 2.3, which will have to be installed for different customers. We will offer different features so the idea is to have the features/bundles separate from the main app and load the into the project using composer. As we are using Doctrine Migrations to maintain DB changes across versions I'm unsure on how to go about using them from a bundle. We're using Capifony to deploy the app to the live server.
So my question is... how can I automatize the execution of migrations from composer loaded bundles?
I ended up creating a command that will copy all migration files from predefined directories in bundles to the default location and then executing doctrine:migrations:migrate from within the command.
For a complex deployment, I used phing. He easily integrate with the Symfony console. But in the end I use of a simple code on the Synfony console.
Composer can easily call Symfony app commands as "post-install-cmd"
I don't think "composer loaded bundles" is the issue here. For instance, you could have several bundles in src/ (part of the app or submoduled) and have the exact same problem. The issue is having multiple entity managers and databases for your different bundles. Where they actually reside is trivial.
Anyway, I'm having the exact same problem. After some searching, I discovered there is actually an open pull request to fix this: https://github.com/doctrine/DoctrineMigrationsBundle/pull/46
I'm hoping it gets fixed soon!