error using doctrine:build --all symfony 1.4.4 apostrophe trunk - symfony1

I'm stumped on why when I do doctrine:build -all it throws 2 warnings.
I've tried commenting out all the schema.yml files and it still throws it.
Anyone better informed help me understand where it is coming from, is there some caching I am unaware of?
I've deleted the cache (./symfony cc). Manually deleted all the lib/ models, forms, filters tasks so that there isn't anything hanging around and to no avail. I can't find anything on google for the error so I'm pretty stuck, I want to understand where the error is coming from, it's very early on in the process so I presume it is yaml related but I don't know how to track down where.
Cheers,
Paul
Shell output section Below:
doctrine generating model classes
PHP Warning: array_merge(): Argument #2 is not an array in /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBaseTask.class.php on line 182
PHP Stack trace:
PHP 1. {main}() /mnt/Target01/338166/www.example.co.uk/web/symfony:0
PHP 2. include() /mnt/Target01/338166/www.example.co.uk/web/symfony:14
PHP 3. sfSymfonyCommandApplication->run() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/command/cli.php:20
PHP 4. sfTask->runFromCLI() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/command/sfSymfonyCommandApplication.class.php:76
PHP 5. sfBaseTask->doRun() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/task/sfTask.class.php:97
PHP 6. sfDoctrineBuildTask->execute() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/task/sfBaseTask.class.php:68
PHP 7. sfTask->run() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBuildTask.class.php:156
PHP 8. sfBaseTask->doRun() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/task/sfTask.class.php:173
PHP 9. sfDoctrineBuildModelTask->execute() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/task/sfBaseTask.class.php:68
PHP 10. sfDoctrineBaseTask->prepareSchemaFile() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBuildModelTask.class.php:67
PHP 11. array_merge() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBaseTask.class.php:182
Warning: array_merge(): Argument #2 is not an array in /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBaseTask.class.php on line 182
Call Stack:
0.0008 47204 1. {main}() /mnt/Target01/338166/www.example.co.uk/web/symfony:0
0.0136 279748 2. include('/mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/command/cli.php') /mnt/Target01/338166/www.example.co.uk/web/symfony:14
0.9075 7815564 3. sfSymfonyCommandApplication->run() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/command/cli.php:20
0.9419 7817164 4. sfTask->runFromCLI() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/command/sfSymfonyCommandApplication.class.php:76
0.9433 7818056 5. sfBaseTask->doRun() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/task/sfTask.class.php:97
1.0198 8445008 6. sfDoctrineBuildTask->execute() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/task/sfBaseTask.class.php:68
2.0900 9762304 7. sfTask->run() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBuildTask.class.php:156
2.0907 9764724 8. sfBaseTask->doRun() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/task/sfTask.class.php:173
2.0926 9766452 9. sfDoctrineBuildModelTask->execute() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/task/sfBaseTask.class.php:68
2.1560 9789556 10. sfDoctrineBaseTask->prepareSchemaFile() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBuildModelTask.class.php:67
4.3235 10119764 11. array_merge() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBaseTask.class.php:182
file+ /tmp/doctrine_schema_70082.yml

I just stumbled over the same error. I had an error in my schema.yml by definining an empty table name:
SomeTableNameThatShouldHaveBeenRemoved:
SomeOtherTableName:
colums:
id: etc. pp
Rather easy to spot one would think, yet when such a vague warning is thrown ...

Related

CableReady (Rails) Basic case giving mystifying error message

cable_ready 4.5.0
rails 6.1.4.1
ruby 3.0.2p107
This is a simple example from the basic tutorial (https://www.youtube.com/watch?v=F5hA79vKE_E) I suspect the error I am getting is because either cable_ready or rails evolved a little and created a tiny incompatibility.
I get this error in the JS console:
It is triggered when in my controller I ask cable ready to:
cable_ready["timeline"].console_log(message: "***** cable ready post created")
Which leads to my timeline_channel to:
received(data) {
console.log("******** Received data:", data.operations)
if (data.cableReady) CableReady.perform(data.operations)
}
My interpretation is perform causes this line in cable_ready.js line 13:
operations.forEach(function (operation) {
if (!!operation.batch) batches[operation.batch] = batches[operation.batch] ? ++batches[operation.batch] : 1;
});
Is finding something in the received data that it doesn't like.
That's where my trail ends. Can someone see what I am doing wrong, or tell me what other code you'd like me to include?
Solution: downgrade the version of the cable_ready javascript library.
I previously (maybe a year ago) did this tutorial using CableReady 4.5, Ruby 2.6.5 and Rails 6.0.4 and it worked like a charm back then as well as today.
But today, I tried this tutorial again on a duplicate project--same versions of CR, Ruby, and Rails and now I get java console errors similar to yours.
TypeError: undefined is not a function (near '...operations.forEach...')
perform -- cable_ready.js:13
received -- progress_bar_channel.js:8
I looked at the output of yarn list and saw that cable_ready was version 5.0.0-pre8 on the bad project and it was 5.0.0-pre1 on the good project. The downgrade could be accomplished with yarn add cable_ready#^5.0.0-pre1 in the bad project folder and now both projects work.
FYI for other newbies like me trying to understand how CableReady works: This tutorial gives another example of CableReady, and was also fixed the same way.

Ruby gem origami sign signature failed

I'm trying to make the PDF file with signature with origami gem, follow this example https://github.com/gdelugre/origami/blob/master/examples/signature/signature.rb
Now i just run this signature.rb and got error
[error] Breaking on: ">>\nendobj\n..." at offset 0x1f6f3
[error] Last exception: [Origami::InvalidObjectError] Failed to parse object (no:43,gen:0) -> [ArgumentError] wrong number of arguments (given 1, expected 0; required keyword: year)
I have no idea to move forward :'<
I also found the sign method of gem at https://github.com/gdelugre/origami/blob/master/lib/origami/signature.rb, and have take a look, I can't find any specific things to do :'<
Might this example is outdate?
The error message is known see https://github.com/gdelugre/origami/issues/80
A fix should be available https://github.com/gdelugre/origami/pull/74/commits
But has not been added so use newer file from the fork https://github.com/pocke/origami/tree/fix-ruby-2.7-kwargs-warnings
Specifically you need this updated file and may need to follow any other suggestions from above.
https://github.com/pocke/origami/raw/fix-ruby-2.7-kwargs-warnings/lib/origami/filters/predictors.rb
However it always worth looking for a fork with many more recent improvements such as
https://github.com/joelsondrew/origami

zendframework 2 doctrine2 schema will not open

i am working in zendframework 2 in conjuction with doctrine 2
i am trying to use the orm:validate-schema to validate and generate tables in my database; i.e match the entity class User with a new table.
i followed the tutorial by marco pivetta
http://marco-pivetta.com/doctrine-orm-zf2-tutorial/#/24
however when i try to open the schema in my git i.e
andreea#Andreea-HP /cygdrive/c/users/andreea/zend/testingZend
./vendor/bin/doctrine-module orm:validate-schema
i get the following message:
Could not open input file:
/cygdrive/c/users/endy/zend/testingZend/vendor/doctrine/doctrine-module/bin/doctrine-module
does anyone have an idea why i am unable to open the page
warm regards
Andreea
hi again
followng the advice of foozi i tried the folllowing:
php public/index.php orm:validate-schema
however, i received the following error message:
Undefined index: APPLICATION_ENV in C:\Users\andreea\zend\testingZend\public\index.php on line 19
Call Stack:
0.0002 235176 1. {main}() C:\Users\andreea\zend\testingZend\public\index.php:0
Zend Framework 2.2.5 application
Usage:
Reason for failure: Invalid arguments or no arguments provided
PHP Notice: Undefined index: APPLICATION_ENV in C:\Users\andreea\zend\testingZend\public\index.php on line 19
PHP Stack trace:
PHP 1. {main}() C:\Users\andreea\zend\testingZend\public\index.php:0
i believe that the message is referring to the followng:
/**
* Display all errors when APPLICATION_ENV is development.
*/
if ('development' === $_SERVER['APPLICATION_ENV']) {
error_reporting(E_ALL);
ini_set("display_errors", 1);
}
would be gratful for some advice
Try to use doctrine command line over your application's index instead of directly doctrine-module binaries (actually both of them does same thing)
$ cd /your/zf2/project
$ php public/index.php orm:validate-schema
This is the way which i prefer.

Paamayim nekudotayims in PHP 5.2

I can upgrade php 5.2 in my server. I have to make this server work today (the vacation I have planned tomorrow is under question because of this error) with new testlink. I am stuck with following error i.e Paamayim nekudotayims.
What changes I should do to resolve it?
This link contains the file with the bug.
The Scope Resolution Operator (also called Paamayim Nekudotayim) or in simpler terms, the double colon, is a token that allows access to static, constant, and overridden properties or methods of a class.
SO may be in your codes you try to call static method or properties with wrong operator.
From Wikipedia:
In PHP, the scope resolution operator is also called Paamayim
Nekudotayim (Hebrew: פעמיים נקודתיים‎), which means “double colon” in
Hebrew.
The name "Paamayim Nekudotayim" was introduced in the
Israeli-developed Zend Engine 0.5 used in PHP 3. Although it has been
confusing to many developers who do not speak Hebrew, it is still
being used in PHP 5, as in this sample error message:
$ php -r :: Parse error: syntax error, unexpected
T_PAAMAYIM_NEKUDOTAYIM
As of PHP 5.4, error messages concerning the scope resolution operator
still include this name, but have clarified its meaning somewhat:
$ php -r :: Parse error: syntax error, unexpected '::'
(T_PAAMAYIM_NEKUDOTAYIM)

Authlogic save causing 502 Bad Gateway error, Illegal Instruction in Rails console

I recently set up a new app server (Ruby 1.8.7 REE, Rails 2.3.8, Passenger 3.0.9, Nginx 1.0.6) behind a proxy and am encountering some strange behavior. When posting to /login on this app server alone, I get a 502 Bad Gateway error. This does not happen on the other app server, and both are set up identically. I've narrowed the problem down to a specific line of code - the saving of an Authlogic session. When I comment out these lines (specifically the save call):
#user_session = UserSession.new(params[:user_session])
if #user_session.save
...
the 502 error no longer occurs. Likewise, when I test these commands in the console, I get an Illegal Instruction response and the console crashes:
>> Authlogic::Session::Base.controller = Authlogic::ControllerAdapters::RailsAdapter.new(self)
>> #user_session = UserSession.new({"password"=>"password", "remember_me"=>"0", "login"=>"myuser"})
>> #user_session.save
Illegal instruction
Testing this on the other app server works just fine (console does not crash with Illegal Instruction result).
Any idea where to begin troubleshooting this? I see nothing of value in either the Rails logs or the Nginx logs.
Thanks.
Edit
The Illegal Instruction is occurring during a system call to digest.rb. The same thing happens whether I use the Ubuntu Ruby Enterprise Edition package or whether I compile it myself:
stat("/opt/ruby-enterprise-1.8.7-2011.12/lib/ruby/1.8/digest.rb", {st_mode=S_IFREG|0644, st_size=1145, ...}) = 0
open("/opt/ruby-enterprise-1.8.7-2011.12/lib/ruby/1.8/digest.rb", O_RDONLY) = 15
fstat(15, {st_mode=S_IFREG|0644, st_size=1145, ...}) = 0
close(15) = 0
--- SIGILL (Illegal instruction) # 0 (0) ---
This sounds like it's related to Ruby 1.9 Ramaze App Failing with “Illegal instruction”.
Jörg W Mittag said:
"Illegal instruction" is usually an error message from the CPU meaning some piece of binary code you tried to run contained an instruction that is not implemented on that particular CPU.
This can have multiple reasons:
The binary was compiled with optimization settings for the wrong CPU. The CPU vendors add new instructions all the time, if the compiler optimizes for a CPU that is newer than the one you have, it might have emitted an instruction that your CPU doesn't understand.
The compiler is broken.
The binary is corrupted.
The code you are compiling contains assembly code or intrinsics containing instructions that your CPU doesn't have.
The original question submitter Phil Kulak replied that he had found a stack overflow causing the error.

Resources