# |
May 10th 2021, 22:48 |
rightscoreanalysis |
Cannot declare class IntergrationsAppModel, because the name is already in use |
# |
May 10th 2021, 22:48 |
rightscoreanalysis |
I am creating a plugin for a legacy cake2 project |
# |
May 10th 2021, 22:45 |
tyler.adam.lazenby |
quick question. I am trying to get a contact's ID via ajax from the referrers URI. I can run `dd($this->request->referer(false));` and it will give me something like ```"http://local.ezbusinessmanager.com/contacts/view/1545"``` But this isn't easily parsible. What is the right way to do this? |
# |
May 10th 2021, 22:43 |
admad |
@kevin.pfeifer you didn't specify the plugin name anywhere, Cake can't read your mind :). Use `[plugin => Foo]` as 2nd argument for `scope()`. |
# |
May 10th 2021, 20:50 |
rightscoreanalysis |
is this i related to the autoloader, I recall something |
# |
May 10th 2021, 20:49 |
rightscoreanalysis |
in an old Cake2 project I am getting missing plugin errors, but I can see the plugins in the Plugins folder, and I have run composer to update |
# |
May 10th 2021, 18:43 |
slackebot |
'GET', ], 'pie' => [ 'action' => 'pie', 'method' => 'GET', ] ] ] ); } );``` Now this generates the following parameters for the URL Generator (seen via debug kit) ```{ "controller": "EasybillDocuments", "action": "chart", "_method": "GET", "plugin": null }``` But actually in the `plugin` part there should be `AlfredEasybill` How can I do that? |
# |
May 10th 2021, 18:43 |
kevin.pfeifer |
Hello there community :) I have got a route question. In my Plugin I have defined the following scope and resources ``` $routes->scope( '/api', function( RouteBuilder $builder ) { $builder->setExtensions( [ 'json' ] ); $builder->resources( 'EasybillDocuments', [ 'only' => [ 'index', 'chart', 'pie' ], 'map' => [ 'chart' => [ 'action' => 'chart', 'method' => |
# |
May 10th 2021, 18:08 |
kevin.pfeifer |
mealtime :) |
# |
May 10th 2021, 18:07 |
tyler.adam.lazenby |
ok time for lunch |
# |
May 10th 2021, 18:07 |
tyler.adam.lazenby |
it really has been |
# |
May 10th 2021, 18:00 |
kevin.pfeifer |
thats definitely a good starting opportunity then |
# |
May 10th 2021, 18:00 |
kevin.pfeifer |
sure |
# |
May 10th 2021, 17:58 |
tyler.adam.lazenby |
Yeah, I am lucky that I get to decide the direction of projects. This one is very VERY near the end of the first dev cycle. At that point, I expect more devs to be thrown in to clean up, refactor, etc |
# |
May 10th 2021, 17:58 |
kevin.pfeifer |
but nice :) |
# |
May 10th 2021, 17:56 |
kevin.pfeifer |
i would love to learn quasar and make my own custom express backends but I haven't made the jump yet |
# |
May 10th 2021, 17:56 |
tyler.adam.lazenby |
I am forcing myself to evolve enough that I don't leave things behind but learn to integrate the new frontend frameworks with the good backend capabilities of php |
# |
May 10th 2021, 17:55 |
kevin.pfeifer |
yea i can get that |
# |
May 10th 2021, 17:55 |
tyler.adam.lazenby |
Ummmm not leave it behind. I want to learn react and electron next. But my expertise has been PHP for a really long time. |
# |
May 10th 2021, 17:55 |
kevin.pfeifer |
so will you leave cakephp behind and start something new? |
# |
May 10th 2021, 17:54 |
kevin.pfeifer |
:) |
# |
May 10th 2021, 17:54 |
tyler.adam.lazenby |
you're not wrong |
# |
May 10th 2021, 17:54 |
kevin.pfeifer |
if you stand still you lose |
# |
May 10th 2021, 17:53 |
kevin.pfeifer |
but they should always evolve and improve over time |
# |
May 10th 2021, 17:53 |
kevin.pfeifer |
many things seemed like a good idea in the past |
# |
May 10th 2021, 17:52 |
tyler.adam.lazenby |
Colbolt probably seemed like a good idea at the time |
# |
May 10th 2021, 17:52 |
kevin.pfeifer |
i have heard of cobolt... but not good things :,) |
# |
May 10th 2021, 17:52 |
kevin.pfeifer |
good on you :) |
# |
May 10th 2021, 17:51 |
tyler.adam.lazenby |
My first real programming job (all others were freelance) I was thrown about 30 years of legacy code, projects, programs that didn't work, and I was asked I could fix it. Luckly the guy that owns the place is a former old time programmer (think cobolt) and when I flat out said no, he understood |
# |
May 10th 2021, 17:50 |
kevin.pfeifer |
so kudos to you :) |
# |
May 10th 2021, 17:49 |
kevin.pfeifer |
well then you are definitely an expectional programmer because I have inherited many projects in the past which didn't have any tests, documentation or anything like that |
# |
May 10th 2021, 17:49 |
tyler.adam.lazenby |
I want to leave a nice little framework they can plug right into and ensure things are running the way that they should |
# |
May 10th 2021, 17:48 |
tyler.adam.lazenby |
Haha, well Ci's are needed because I am planning on leaving the project and company some time in the moderate future. I don't want to leave developers hanging |
# |
May 10th 2021, 17:48 |
kevin.pfeifer |
but have tried docker |
# |
May 10th 2021, 17:48 |
kevin.pfeifer |
yea i haven't dealt with CI that closely till now ,:) |
# |
May 10th 2021, 17:47 |
slackebot |
MYSQL_ROOT_PASSWORD: secret # Run the phpunit tests All: script: - cp app.php - vendor/bin/phpunit``` |
# |
May 10th 2021, 17:47 |
tyler.adam.lazenby |
```image: name/ofimage # Cache the vendor folder cache: paths: - vendor/ before_script: # Install composer - curl -sS https://getcomposer.org/installer | php # Install all project dependencies - composer install services: - mysql variables: # Configure mysql service (https://hub.docker.com/_/mysql/) # We will need to use these in the app.php test datasource MYSQL_DATABASE: test_myapp |
# |
May 10th 2021, 17:46 |
tyler.adam.lazenby |
I will be installing composer post image import and vendor non cache in my ci |
# |
May 10th 2021, 17:46 |
kevin.pfeifer |
ah i see |
# |
May 10th 2021, 17:46 |
tyler.adam.lazenby |
Right, the idea with that isn't to test if the project would run in docker. I am just testing to make sure everything is ready so that composer can run |
# |
May 10th 2021, 17:45 |
kevin.pfeifer |
but i could be wrong |