Installing doctrine data fixtures in symfony 2.1.4 - doctrine-orm

Here is what i did:\
added following dependencies inside composer.json
"doctrine/doctrine-fixtures-bundle": "dev-master",
"doctrine/data-fixtures": "dev-master"
ran following command at the terminal:
php composer.phar update
Added following line to appKernel.php
new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(),
When I ran any symfony commands at the prompt, I got error as below:
Class not found: Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle
Then i opened vendor\composer\autoload_namespaces.php and added following line:
'Doctrine\\Bundle\\FixturesBundle' => $vendorDir . '/doctrine/doctrine-fixtures-bundle/'
The error was gone and i could use data fixture easily.
My question is that should the namespace be automatically inserted into vendor\composer\autoload_namespaces.php when I run composer update or I had to manually insert the above line into the autoload_namespaces.php?
In documentation I didnt find anything that says to insert the namespace manually

Related

Passing CMD line arguments to docker entry point in Python

So I've got a docker file like so:
FROM frolvlad/alpine-python2
MAINTAINER *REDACTED*
COPY . .
RUN pip install -r requirements.txt
RUN python misc_scripts/gen_hosts.py
RUN python misc_scripts/strip_delims.py
RUN python runparse.py -spc -spi
ENTRYPOINT ["python", "rebuild.py"]
And using the Docker API in python I'm trying to run the container like so
logs = client.containers.run(image_id, name=str(_uuid), entrypoint=['-m ME3400', '-mi NONE'])
However I get the following error
500 Server Error: Internal Server Error ("OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"-m ME3400\": executable file not found in $PATH": unknown")
I assume I'm doing it wrong, anyone know how/why this isn't working?
As you said in the title of your question, it should be the command argument you expect. Follow the source code on github(starting line 484), it should be more specific.
Change your code as below:
logs = client.containers.run(image_id, name=str(_uuid), command=['-m ME3400', '-mi NONE'])
Always note that CMD will treat as ENTRYPOINT's args when it exists. But if you specify another ENTRYPOINT(in your case: ['-m ME3400', '-mi NONE']), the original one(["python", "rebuild.py"]) will be overwritten.

convert doc to docx using soffice not working

i am trying to convert a doc to docx using the following command:
soffice --headless --convert-to docx test.doc
I am using centos7, and install everything from openoffice throught
yum install openoffice
I am in the current directory of the .doc file.
I am having an error related to filters (I had search about these filters and didn't find one that would solve my problem):
Error: no export filter for teste.docx found, aborting.
Error: no export filter
Everytime i put some filter, it gives me another error:
Error: Please verify input parameters... (SfxBaseModel::impl_store <file:///path/test.txt> failed: 0x81a)
I put the filter (filter example from soffice) and still not working
soffice --headless --convert-to html:"txt:Text (encoded):UTF8" --outdir /home/user/Downloads /home/user/Downloads/test.doc
I discover why it's not working. I uninstall oppenoffice and libreoffice and put another one.
yum remove openoffice* libreoffice*
yum install libreoffice*
Probably it was missing some library or some dependencies were confliting.
Now everything is working.
soffice --headless --convert-to docx teste.doc

Is dusk is mandatory to write phpunit test cases?how to write phpunit test cases in laravel 5.4?

I am newbie to laravel. I am using laravel 5.4 version, we have requirement of writing phpunit test cases for our application, So I have searched for writing phpunit testcases and also read the documentation in laravel website. I read about the 'dusk' feature for doing the browser tests. So, I have a doubt that is "Is the dusk is mandatory for writing the phpunit test cases in laravel 5.4? I also tried to install the 'dusk' package into our application but it is not getting installed after I run the command "composer require laravel/dusk".
below is the error that I am getting on command prompt:
c:\xampp\htdocs\ourappname>composer require laravel/dusk
using version ^1.1 for laravel/dusk
./composer.json has been updated
Loading composer repositories with package information
Updating dependies (including require-dev)
Package operations: 2 installs, 4 updates, 9 removals
- Removing maatwebsite/excel (2.1.17)
- Removing phpoffice/phpexcel (1.8.1)
- Removing jeremeamia/superclosure (2.3.0)
- Removing symfony/polyfill-php56 (v1.3.0)
- Removing symfony/polyfill-util (v1.3.0)
- Removing guzzlehttp/guzzle (6.2.3)
- Removing guzzlehttp/psr7 (1.4.2)
- Removing psr/http-message (1.0.1)
- Removing guzzlehttp/promises (v1.3.1)
- Updating psy/psysh (v0.8.3 => v0.8.5): Loading from cache
- Updating swiftmailer/swiftmailer (v5.4.7 => v5.4.8): Loading from cache
- Updating sebastian/diff (1.4.1 => 1.4.2): Loading from cache
- Updating laravel/framework (v5.4.21 => v5.4.23): Loading from cache
- Installing facebook/webdriver (1.4.1): Loading from cache
- Installing laravel/dusk (v1.1.0): Loading from cache
Writing lock file
Generating autoload files
> Illuminate\Foundation\ComposerScripts::postUpdate
> php artisan optimize
[Symfony\Component\Debug\Exception\FatalThrowableError]
Class 'Maatwebsite\Excel\ExcelServiceProvider' not found
Script php artisan optimize handling the post-update-cmd event returned with error code 1
Installation failed, reverting ./composer.json to its original content.
c:\xampp\htdocs\ourappname>
Anyone please tell me how to fix it? and also what is the process for writing the test cases in laravel 5.4? should we use 'dusk'? or any other way to do it? Thanks.
No, Dusk is not required to do unit testing. You can just use the basic tests.
Your error is related to when you installed the Excel package on your application; the Service Provider was added to your config/app.php, but now that you've removed the package from your application ("Removing maatwebsite/excel (2.1.17)") you also need to remove the Service Provider.

Alamofire- getting 'No such module' error after successful Pod install

Xcode 8, Swift3, cocoapods 1.1+, ios10
I'm getting error - No such module. Below is my pod file and steps I followed. I even looked at same issues from previous versions and solutions mentioned in other threads didn't work.
Setup
Fresh, brand new Xcode 8 project.
Added Alamofire to my Podfile:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!
target ‘weatherkaka’ do
pod 'Alamofire', '~> 4.0'
end
Ran the command $ pod install
Install worked fine, and project compiles via workspace file
Opened xcworkspace file
Import: import AlamoFire
I get the error: "No such module: Alamofire".
What am I missing?
Note: I've done clean, re-open Xcode, clean more, re-compile etc. I've added the Alamofire framework to Linked Frameworks and Build phases.
You might get this error for the first time but try to run that project once and it might go away. Also you can command+click the import Alamofire and check that it points to the Alamofire.
You must be using projectName.xcworkspace not the xcodeproj.

GSP compilation failed in grails

When I run grails war I got the following error
Compiling 30 GSP files for package [appInfo].
| Error GSP Compilation error in file /WEB-INF/plugins/app-info-0.4.3/grails-app/views/appinfo/hibernateEntityInfo.gsp at line 69: Tag [each] missing required attribute [in]
I used
grails 2.2.4
and also I want to know the app-info plugin location in the application
It is the problem with App-info plugin. I also got similar problem . I solved by following way
Clean the application using
grails Clean
then run the application using
grails RunApp
and make sure If you are using sequences in the application do not use mysql because mysql does not support sequences.