Logs for #cakephp

Page 5 of 36,154, showing 100 records out of 3,615,322 total, starting on record 401, ending on 500

# At Username Text
# Jun 13th, 08:13 conehead @office try `php composer.phar` instead of `composer`
# Jun 13th, 08:11 noel oh cool. Good to know.
# Jun 13th, 08:10 conehead @noel Guess that is not 100% correct. You actually can specify a given commit. I have done it with a package that it not maintained anymore, but someone still created a PR. `"jpgraph/jpgraph": "4.x-dev#934753128231805c1feacddd131f37fa92be3430",` GitHub :`https://github.com/ztec/JpGraph/pull/20/commits/934753128231805c1feacddd131f37fa92be3430`
# Jun 13th, 08:05 noel Or you might be able to use composer: https://stackoverflow.com/questions/12954051/use-php-composer-to-clone-git-repo
# Jun 13th, 08:03 noel @office you can't update to a PR (pull request) on github using composer. Composer links to packagist.org, so you can only update to new releases on that site. If you want bleeding edge then you have to manually update the vendor files.
# Jun 13th, 07:57 office Hello, i hope so can give me a tip where to start from. I am lower than beginner. I read i need to update *FriendsOfCake* and i already changed Object to BaseObject as given here https://github.com/FriendsOfCake/crud/pull/549 This is the warning i see ```Warning (2): count(): Parameter must be an array or an object that implements Countable [CORE/src/Database/QueryCompiler.php, line 128] Warning (2): count() [<a
# Jun 13th, 07:57 slackebot1 href='http://php.net/function.count'>function.count</a>]: Parameter must be an array or an object that implements Countable [CORE/src/Database/QueryCompiler.php, line 128]``` I have no idea how to update the vendor. I updated line 2 of *composer.json* in *vendor/friendsofcake/crud* from *"name":"friendsofcake/crud"* > *"name":"friendsofcake/crud":"~5.2.0"* Then acessed via SSH and opened the the sub directory whre the api is and ran `composer update`
# Jun 13th, 07:57 slackebot1 and here is the response ```bash: composer: command not found```
# Jun 13th, 06:47 admad ah
# Jun 13th, 06:46 lars.ebert Off topic: That uses the default installed version of php (which is 5.something on my OS). Thats why I prepend `php`, which is aliased to the correct version.
# Jun 13th, 06:43 admad it's already an executable
# Jun 13th, 06:43 admad @lars.ebert no idea about the error but you should just use `vendor/bin/phpunit`
# Jun 13th, 06:43 kk okay will try admad. Thanks for your time so far
# Jun 13th, 06:42 lars.ebert I have a question: I am trying to run the phpunit tests that come with cakephp/cakephp but keep running into an error “failed to open stream: Too many open files”. Am I doing something wrong? I just run `php vendor/bin/phpunit`.
# Jun 13th, 06:42 admad if it exists in repo then run `composer install`
# Jun 13th, 06:41 admad ideally the composer.lock should also have been commited for the app which would have avoided such problems
# Jun 13th, 06:40 kk will try. Thanks!
# Jun 13th, 06:40 kk alright sounds good
# Jun 13th, 06:40 admad try removing it and then run `composer update`. If it succeeds then re-add it using `composer require elboletaire/twbs-cake-plugin`
# Jun 13th, 06:39 admad the problem is most likely `elboletaire/twbs-cake-plugin`
# Jun 13th, 06:39 admad don't upgrade cakephp without reading the migration guide
# Jun 13th, 06:39 kk or rather... what exactly does the command do?
# Jun 13th, 06:38 kk just for my understanding... why do we use cakephp 3.7.*? I was thinking i should try to install cakephp 3.1.0?
# Jun 13th, 06:33 kk no worries :) its early for me too
# Jun 13th, 06:33 conehead composer not php
# Jun 13th, 06:33 conehead ah sorry `composer require --update-with-dependencies "cakephp/cakephp:3.7.*"`
# Jun 13th, 06:31 kk in the root folder of my project? i get "could not open input file: require"
# Jun 13th, 06:28 kk but i can try now
# Jun 13th, 06:28 kk Morning, no i haven't. I tried google for some solutions but couldnt find anything useful
# Jun 13th, 06:27 conehead Good morning. Did you try `php require --update-with-dependencies "cakephp/cakephp:3.7.*"`
# Jun 13th, 06:24 kk Good Morning everyone, first time here. I have a question... i am trying to setup a project of my company which still uses old cakephp versions (3.1.0). I used Sourcetree to clone the repository and the next step would be to update COMPOSER, but when i move to the folder and run composer update i get the following message: composer update Loading composer repositories with package information Updating dependencies (including require-dev) Your
# Jun 13th, 06:24 slackebot1 requirements could not be resolved to an installable set of packages. Problem 1 - Installation request for cakephp/cakephp 3.1 -> satisfiable by cakephp/cakephp[3.1.0]. - elboletaire/twbs-cake-plugin dev-master requires cakephp/cakephp ^3.3 -> satisfiable by cakephp/cakephp[3.5.x-dev, 3.6.x-dev]. - Can only install one of: cakephp/cakephp[3.5.x-dev, 3.1.0]. - Can only install one of: cakephp/cakephp[3.6.x-dev, 3.1.0]. -
# Jun 13th, 06:24 slackebot1 Installation request for elboletaire/twbs-cake-plugin dev-master -> satisfiable by elboletaire/twbs-cake-plugin[dev-master]. What do i need to do? And how? I am just starting as a software dev so i dont have too much technical knowledge. Thank you very much in advance! Greets Carlos
# Jun 13th, 05:45 conehead Additionally, even if I set the dirty flag to `false`, there will still be new joinData be created in the database. Exact same entry, but with a different id
# Jun 13th, 05:35 conehead Hm last time I ask before I create an issue/bug :slightly_smiling_face: I got some `through` data and I do not want to change it when loading/saving the model. I save this data with the following structure: ``` tags => [ (int) 0 => [ 'id' => '39bd3238-0e3f-433e-8fd0-857f27a8c83f', '_joinData' => [ 'id' => 'b64e8d7a-53e6-4432-99a8-b8b97fee0883' ] ] ] ``` But in the `beforeSave()` method the `_joinData` is marked as dirty
# Jun 13th, 05:35 slackebot1 (although current and `[original]` data is exactly the same). This results in saving the `_joinData` a second time. Which in my opinion should not happen
# Jun 13th, 05:00 conehead Ah, thank you very much. Totally missed that. Just got up :(
# Jun 13th, 04:54 admad @conehead 3.8 still only has RC release. So if you want to use that you will have to add `"minimimum-stability": "RC"` in your composer.json
# Jun 13th, 04:50 conehead Good morning everyone. Anyone already tried cake 3.8? Getting an composer error: ``` Problem 1 - The requested package cakephp/cakephp 3.8.* is satisfiable by cakephp/cakephp[3.8.0-RC1, 3.8.0-RC2, 3.8.0-RC3, 3.8.0-beta1] but these conflict with your requirements or minimum-stability. Problem 2 - cakephp/bake 1.9.6 requires cakephp/cakephp ^3.7.0 -> satisfiable by cakephp/cakephp[3.7.0, 3.7.0-RC1, 3.7.0-RC2, 3.7.0-RC3, 3.7.0-beta1,
# Jun 13th, 04:50 slackebot1 3.7.1, 3.7.2, 3.7.3, 3.7.4, 3.7.5, 3.7.6, 3.7.7, 3.7.8, 3.8.0-RC1, 3.8.0-RC2, 3.8.0-RC3, 3.8. 0-beta1] but these conflict with your requirements or minimum-stability. ``` And many more problems to come with similar to `Problem 2`. Is it correct that no `Tag: 3.8` exist?
# Jun 13th, 03:23 challgren Second if you must do bulk updates its probably better to do it the recommended way https://book.cakephp.org/3.0/en/orm/saving-data.html#bulk-updates
# Jun 13th, 03:10 challgren First why not just update the entity instead of trying to do a bulk update?
# Jun 13th, 02:56 slackebot1 can I implement an error handler for this one?
# Jun 13th, 02:56 drailanjohn.gss ``` $query = $resourceTimetables->query(); $query->update() ->set([ 'last_reservable_time' => $prm['last_order_time'], 'max_treatment_minutes_of_last_reservation' => $prm['max_last_order_min'], 'last_reservable_kind' => $prm['only_personal'] ]) ->where(['mst_reservation_resource_id' => $resource_id->id]) ->execute(); ``` How
# Jun 13th, 02:36 noel From the bake helper, how can I check if a table exists?
# Jun 13th, 02:28 challgren :cakephp: 3.8.0-RC3 is released!!! https://github.com/cakephp/cakephp/releases/tag/3.8.0-RC3
# Jun 13th, 02:09 noel @admad ok tx, makes sense. Btw I'm extending bake to handle self-referencing many-to-many. Not sure if it's of interest as a PR?
# Jun 13th, 02:08 admad They are 2 separate things with same name
# Jun 13th, 02:07 admad `columns()` is the public method
# Jun 13th, 02:06 admad @noel it's because `columns` is a protected property, you can't access it from outside the class
# Jun 13th, 01:02 graziel i just used whats in manual https://book.cakephp.org/3.0/en/orm/schema-system.html#accessing-column-data
# Jun 13th, 01:02 noel Isn't it an object? Standard object properties in php are referenced with `->columns` not `->columns()`
# Jun 13th, 01:01 noel I'm so confused
# Jun 13th, 01:01 noel yeah that works.... but why?
# Jun 13th, 00:59 graziel and `->getSchema()->columns();` ?
# Jun 13th, 00:58 noel Also `get_object_vars($model->getSchema()) returns an empty array.
# Jun 13th, 00:56 noel How do I get the properties of a schema? I do `print_r($model->getSchema())` and it shows an object that has a `columns` property but then I do `print_r($model->getSchema()->columns)` and it says that the property does not exist??
# Jun 13th, 00:41 graziel enable query logging in app.php and check generated sql in query.log
# Jun 13th, 00:35 rightscoreanalysis but related data exits in my db
# Jun 13th, 00:35 rightscoreanalysis the result has p.id => null
# Jun 13th, 00:35 slackebot1 <rightscoreanalysis>
# Jun 13th, 00:35 rightscoreanalysis anyone able to help with a leftJoin
# Jun 12th, 22:42 ricksaccous ;)
# Jun 12th, 22:42 ricksaccous it is possible
# Jun 12th, 22:42 ricksaccous figured it out
# Jun 12th, 22:36 challgren @noel the schema-dump-default.lock keeps track of your database structure for generating `cake bake migration_diff`s
# Jun 12th, 22:29 ricksaccous in the resolver
# Jun 12th, 22:29 ricksaccous to the finder rather
# Jun 12th, 22:29 ricksaccous to the resolver
# Jun 12th, 22:29 ricksaccous is there a way to feed options
# Jun 12th, 22:29 ricksaccous https://book.cakephp.org/authentication/1.1/en/identifiers.html#identifiers
# Jun 12th, 22:29 ricksaccous in loading an authenticator
# Jun 12th, 17:52 ricksaccous i have no idea but that sounds most likely
# Jun 12th, 17:52 ricksaccous probably a change in Type
# Jun 12th, 17:03 cnizzardini not being able to decrypt financial data will make your balls go WAY UP into your stomach :flushed:
# Jun 12th, 17:02 cnizzardini for reference stream_get_contents(resource) must now be called
# Jun 12th, 17:02 noel @admad What does `parent_id` do in `findBelongsTo` method of bake's `ModelTask.php`? What is the intention behind that check? What sort of relationship does that support? Is it a self-referencing one-to-many?
# Jun 12th, 16:55 cnizzardini We have encrypted data in there that must be passed into a Security::decrypt as a string, anyone know what changed between 3.5 and 3.7
# Jun 12th, 16:55 cnizzardini After upgrading to 3.7, cakes orm results are treating a varbinary datatype as a resource
# Jun 12th, 16:51 noel What is `config/schema/schema-dump-default.lock` for?
# Jun 12th, 16:47 noel Oh never mind.. it's because somehow the bake documentation redirected me to cookbook for 1.x and then the search function is looking in the wrong book.
# Jun 12th, 16:44 noel I can't find any documentation for Migrations?
# Jun 12th, 15:00 jeremyharris it’s nice that the idea is reinforced though :)
# Jun 12th, 14:59 neon1024 Always ahead of the game @jeremyharris :thumbsup:
# Jun 12th, 14:59 jeremyharris sometimes you just gotta check auth elsewhere I guess ¯\_(ツ)_/¯
# Jun 12th, 14:59 jeremyharris ^ that was my first suggestion. the authorization plugin does a great way of abstracting out scoping and such for this very purpose
# Jun 12th, 14:59 neon1024 Or have the query building part as a function and take a permissions object I guess :thinking_face:
# Jun 12th, 14:58 neon1024 You could also conditionally build custom finders in your controller based on the permissions
# Jun 12th, 14:58 awi Thank you very much
# Jun 12th, 14:58 awi Didnt know the footprint. thats a nice plugin
# Jun 12th, 14:55 jeremyharris there are a few ways to do that then. like I said you can inject the identity (User) into the behavior, or add a listener that injects it (see muffin/footprint for an example of this)
# Jun 12th, 14:55 awi reason is, that I run an Rest-API by Cake. And I dont have the luxury of relying on well formed POST-Requests as anyone can connect himself through the API
# Jun 12th, 14:54 awi I think I want to have it here
# Jun 12th, 14:54 awi > generally you don’t want to do authorization handling in that layer of the application
# Jun 12th, 14:50 jeremyharris however, if you must, you can always inject the identity into the behavior from the controller
# Jun 12th, 14:49 jeremyharris generally you don’t want to do authorization handling in that layer of the application, it makes testing harder and the domain layer shouldn’t be concerned with authorization necessarily. instead, make changes from the outside, e.g. the controller changes a finder (scopes the query)
# Jun 12th, 14:48 awi Or: Are there reasons not to do it
# Jun 12th, 14:48 awi I try to build a Behavior checking if someone is authorized to link something associated. All my Information about authorization is in a component. Can I call the Component from the behaviour?
# Jun 12th, 14:45 awi hi.
# Jun 12th, 14:16 ricksaccous crazy