# |
Apr 17th 2019, 17:20 |
cpierce |
ahh found it |
# |
Apr 17th 2019, 17:18 |
cpierce |
i don't know what i've done worng - i was just updating to the latest version |
# |
Apr 17th 2019, 17:18 |
cpierce |
it's still broken |
# |
Apr 17th 2019, 17:14 |
cpierce |
and had composer pull it again |
# |
Apr 17th 2019, 17:14 |
cpierce |
i deleted vendor folder |
# |
Apr 17th 2019, 17:13 |
admad |
You have somehow messed up autoloading |
# |
Apr 17th 2019, 17:12 |
cpierce |
no |
# |
Apr 17th 2019, 17:12 |
dereuromark |
are you testing a plugin? |
# |
Apr 17th 2019, 17:11 |
cpierce |
anyone help me out on the cause of this issue? ... obviously it's referencing it in the vendor file so i'd assume i'm missing something that should be installed |
# |
Apr 17th 2019, 17:10 |
cpierce |
```./bin/cake PHP Fatal error: Uncaught Error: Class 'Cake\Routing\Router' not found in /var/www/cpierce-testing/vendor/cakephp/cakephp/config/bootstrap.php:22 Stack trace: #0 /var/www/cpierce-testing/config/bootstrap.php(30): require() #1 /var/www/cpierce-testing/bin/cake.php(31): include('/var/www/cpierc...') #2 {main} thrown in /var/www/cpierce-testing/vendor/cakephp/cakephp/config/bootstrap.php on line 22``` |
# |
Apr 17th 2019, 16:27 |
ksc |
To explain what i try to do: I try to increment an order number based on one client. -> pair of "client_id" and "order_nbr" should be unique. I call a generateOrderNbr function in the beforeSave() function of my orders table. I tried the buildrules, but this doesn't work: $rules->add($rules->isUnique(['client_id', 'order_nbr'], _('Order No. has to be unique.'))); |
# |
Apr 17th 2019, 16:17 |
ksc |
Hi, is real uniqueness for 2 combined columns with CakePHP 3 possible if it's not configured in mysql as UNIQUE INDEX ? |
# |
Apr 17th 2019, 16:04 |
facuvillard |
Okey okey! Thanks! |
# |
Apr 17th 2019, 15:58 |
steinkel |
@facuvillard there is a specific channel for spanish support |
# |
Apr 17th 2019, 15:56 |
neon1024 |
Also I believe that @steinkel is a Spanish speaker, so might be able to advise further :slightly_smiling_face: |
# |
Apr 17th 2019, 15:56 |
neon1024 |
Or Sphinx I forget what it’s written in now :slightly_smiling_face: |
# |
Apr 17th 2019, 15:56 |
neon1024 |
You can download the docker container if you’d want, but Github does a pretty good job with Latex |
# |
Apr 17th 2019, 15:55 |
neon1024 |
The pages pretty much match the urls |
# |
Apr 17th 2019, 15:55 |
waspinator |
https://book.cakephp.org/3.0/es/index.html |
# |
Apr 17th 2019, 15:55 |
neon1024 |
So you can contribute translations to here https://github.com/cakephp/docs/tree/3.0/es |
# |
Apr 17th 2019, 15:55 |
neon1024 |
The existing docs are here, https://book.cakephp.org/3.0/es/index.html |
# |
Apr 17th 2019, 15:54 |
neon1024 |
The repo is here https://github.com/cakephp/docs |
# |
Apr 17th 2019, 15:53 |
facuvillard |
i want help cakephp with documentation in Spanish language, but i dont know how :( |
# |
Apr 17th 2019, 15:52 |
facuvillard |
Hi, i need help |
# |
Apr 17th 2019, 15:11 |
Coddyx |
It is :) |
# |
Apr 17th 2019, 15:11 |
neon1024 |
Hope it’s helpful! :thumbsup: |
# |
Apr 17th 2019, 15:11 |
Coddyx |
Thank you for your time and explanations |
# |
Apr 17th 2019, 15:07 |
neon1024 |
This is where SOLID comes in, and the Composition over Inheritance principle, which leads into the Dependancy Injection rabbit hole! |
# |
Apr 17th 2019, 15:07 |
neon1024 |
When creating a mock for a class, you can only mock the return of a method in that class |
# |
Apr 17th 2019, 15:06 |
neon1024 |
Yes |
# |
Apr 17th 2019, 15:03 |
Coddyx |
Is this because I can't mock a return value of a function not directly called by the test? |
# |
Apr 17th 2019, 15:03 |
Coddyx |
But whatever I put in $this->returnValue the test always failed |
# |
Apr 17th 2019, 15:02 |
Coddyx |
$alertes = $this->getMockForModel('Alertes', ['get']); $alertes ->expects($this->once()) ->method('get') ->will($this->returnValue(false)); $this->get('/en'); $this->assertResponseCode(503); |
# |
Apr 17th 2019, 15:02 |
Coddyx |
ie |
# |
Apr 17th 2019, 15:02 |
Coddyx |
I also tried mocking the return value of the get method on the model |
# |
Apr 17th 2019, 15:02 |
Coddyx |
WHILE we're there |
# |
Apr 17th 2019, 15:02 |
Coddyx |
and |
# |
Apr 17th 2019, 15:02 |
Coddyx |
ok |
# |
Apr 17th 2019, 15:01 |
neon1024 |
It’d probably be the least amount of work |
# |
Apr 17th 2019, 15:00 |
Coddyx |
To switch the value for true and false |
# |
Apr 17th 2019, 15:00 |
Coddyx |
You suggest I hit the db before the true and false test for miantenance mode? |