# |
Mar 6th 2018, 21:28 |
savant |
i used to maintain homebrew-php and so am _very_ comfortable with that setup |
# |
Mar 6th 2018, 21:27 |
ricksaccous |
i see |
# |
Mar 6th 2018, 21:27 |
savant |
works fine |
# |
Mar 6th 2018, 21:27 |
savant |
brew install mysql |
# |
Mar 6th 2018, 21:27 |
savant |
source in my env vars, run that |
# |
Mar 6th 2018, 21:27 |
savant |
`bin/cake server` |
# |
Mar 6th 2018, 21:27 |
savant |
php on my mac |
# |
Mar 6th 2018, 21:27 |
ricksaccous |
a vagrant box? |
# |
Mar 6th 2018, 21:27 |
ricksaccous |
@savant out of curiosity what dev env do you use? |
# |
Mar 6th 2018, 21:24 |
savant |
FrozenTime is Immutable |
# |
Mar 6th 2018, 21:20 |
etipaced |
So for immutable (between Chronos and FrozenTime), what is the selection criteria? |
# |
Mar 6th 2018, 21:18 |
savant |
if you want a time thats mutable vs one that isnt |
# |
Mar 6th 2018, 21:17 |
etipaced |
How does one know when to use Chronos vs. Time vs. FrozenTime? |
# |
Mar 6th 2018, 20:58 |
savant |
and show what you want to happen and what actually happens? |
# |
Mar 6th 2018, 20:58 |
savant |
meder: can you gist some code? |
# |
Mar 6th 2018, 20:18 |
meder |
work fine separately* |
# |
Mar 6th 2018, 20:18 |
meder |
is there a reliable way of chaining 2 separate group by collection calls? $results->groupBy('parent.group_id') and $results->groupBy('parent_id'); which work fine, but if i chain them it doesn't work properly and understandably because they change the structure. but even if i try something like ->groupBy('parent.group_id')->groupBy('{n}.parent_id') that doesn't work as I think it does |
# |
Mar 6th 2018, 20:02 |
meder |
savant: ah- ty |
# |
Mar 6th 2018, 18:27 |
savant |
`$Table->schema()->columns()` |
# |
Mar 6th 2018, 18:27 |
savant |
I believe you can do |
# |
Mar 6th 2018, 18:27 |
meder |
and it'd be far easier doing table.* if there's a way |
# |
Mar 6th 2018, 18:26 |
meder |
i have a couple tables and for some of them, i want all rows but not others |
# |
Mar 6th 2018, 18:26 |
meder |
with select(), can i do table.* or do i have to explicitly do columns? |
# |
Mar 6th 2018, 17:06 |
phantomwatson |
Hereyago: https://github.com/cakephp/cakephp/issues/11794 |
# |
Mar 6th 2018, 17:05 |
savant |
thats so unnecessary lol |
# |
Mar 6th 2018, 17:04 |
admad |
please open a ticket |
# |
Mar 6th 2018, 17:04 |
admad |
might be for BC with 2.x, it had even wackier magic for generating form urls |
# |
Mar 6th 2018, 17:04 |
savant |
wow |
# |
Mar 6th 2018, 17:04 |
savant |
lmao |
# |
Mar 6th 2018, 17:03 |
phantomwatson |
Huh. :S |
# |
Mar 6th 2018, 17:01 |
admad |
@phantomwatson there are tests for this wacky behavior :( https://github.com/cakephp/cakephp/blob/master/tests/TestCase/View/Helper/FormHelperTest.php#L805 |
# |
Mar 6th 2018, 16:43 |
phantomwatson |
I'm confused why I've never run into this before either. It doesn't seem like that rare of a condition to run into. |
# |
Mar 6th 2018, 16:42 |
admad |
though pretty sure i have used urls without id for editing records and don't remember the id being auto appended ever. |
# |
Mar 6th 2018, 16:41 |
phantomwatson |
On it. Issue forthcoming. |
# |
Mar 6th 2018, 16:40 |
admad |
@phantomwatson indeed, that really is strange. Please open and issue with examples should the difference in behavior. |
# |
Mar 6th 2018, 16:40 |
slackebot |
‘Degrees’“. This works. Is this the normal way of doing this, or can i add for example in the $fixtures array something like ‘app.min_degree_levels’ => ‘Degrees’ ? |
# |
Mar 6th 2018, 16:40 |
willem |
I have a databasetable that references another table in the database. For example, field ‘min_degree_level_id’ uses ‘Degrees’. Cake baked the model as “$this->belongsTo(‘MinDegreeLevels’)“. When baking fixtures there now is a ‘app.min_degree_levels’ entry. This is a non-existent table, as it is a reference to Degrees. Running PhpUnit this will fail. So i copied the DegreesFixture to a new fixture ‘MinDegreeLevels’ and a |
# |
Mar 6th 2018, 16:39 |
dereuromark |
Seems like a rare use case, but looks like a bug/issue indeed. |
# |
Mar 6th 2018, 16:38 |
phantomwatson |
Check out `FormHelper::_formUrl()`: https://github.com/cakephp/cakephp/blob/master/src/View/Helper/FormHelper.php#L481 From what I can tell, specifying a URL as an array (but without a route `_name` or any extra passed parameters) for a form results in the record ID being appended (if it exists) to the URL. |
# |
Mar 6th 2018, 16:35 |
admad |
if would be really surprised if what you claim is true |
# |
Mar 6th 2018, 16:34 |
phantomwatson |
I know there are a bunch of easy workarounds too, but specifying a URL as an array just doesn't seem to work the way the documentation suggests it does. If there's no code change, then this might call for a note in the documentation at the least. |