« first day (2412 days earlier)      last day (2532 days later) » 

3:11 AM
tnx @gmazzap, forgot about checking it is the main loop as I was mainly testing that the rewrite rule works (after all those years, still a magic for me) .... seems like WC does queries even before wordpress is fully loaded, probably trying to check if one of their API is triggered.
 
 
3 hours later…
6:34 AM
after several repeating instructions, using all capital letters in bold, my client still succeeded to break the site by updating the wp jobs plugin.... thank god for git and my decision to use it for all the installed plugins and not only my code
... it is sad that even auomattic can not release plugins only after they have been properly tested... how can anyone complain about any small plugin or theme author if this is the examples being set by the major players :(
 
 
2 hours later…
8:16 AM
why did client even could? no file mods, composer, done.
 
^ 1000 times this
 
 
1 hour later…
9:18 AM
because he is the client and I am only the hired stupid coder. got only 18 plugins on a complex site very lean ;)
 
Then give your best to explain him why you need to protect him from himself in his best interest and take away admin access.
 
.... and I did tell him that if he do that again I will make the directories read only :)
the thing is @kraftner, that it is too much work to remove it when you do want to update. It is not "do not update" more of "control the timing of updaates"
 
composer
 
isn't it an all or nothing? (/me admits total ignorance)
 
you can do partial, but why not just all?
 
9:25 AM
fuelled the fire - handing over to Mr. Composer ;)
 
right now for example there are updates for both wp jobs and yoast. the code is very neutral to yoast so should be safe to update, but wp jobs requires testing as it is very central
 
So, at least take admin access away from Client. The Client should never be able to update stuff on his own. You test it locally, then you deploy. Ideally with Composer.
 
ah, you can, of course, tell Composer to update just specific package
 
yeh I am sure I can, again I am just too ignorant right now to use it
@kraftner, it is the testing enviroment, but I should disable updates on production
 
if you have time to fix broken sites, you have time to switch to composer :)
 
9:28 AM
LOL
do git stash is faster than learning composer ;)
 
git for dependency management is pain and suffering
 
Please take the time. It is so worth it. I waited way too long to do so too. I wish someone convinced me earlier. (Thanks @Rarst)
 
not for dependency, just to remove mistakes.
hopefully he will never discover "git push" :) but in that level even composer will not help
(I see a philosophical clash here, I do not want any code to get anywhere before I audit it in at least some minimal level, this goes against the whole automatic update thing)
 
Composer!
You define the dependency, lock it to a certain version and can be sure it is that.
 
what about the trail of automatic dependency when I upgrade. So right now there can not be a dependencies for plugin, but assume there was.... what happens when an upgrade pulls dependency that is also a dependency for another plugin? I need to test that functionality as well but will (I guess) get no indication about that
 
9:43 AM
it will tell you what updated or if update cannot be performed because dependencies must change, and such
 
answer is to have phpunit for the project.... no client will pay for the time
 
for example you can require specific PHP version range in your project and you will know if any dependency needs newer PHP
 
but in the end, I am unlikely to read the notifications unless something fails. So even if there is a message of "package A, B and C were upgrade, I am just not very likely to notice. (with linux upgrades I am just clicking yes for everything ;) )
 
Wait what? You do this manually and ignore the console output?
 
this depends on the information overload. I am just being realistic
automatic testing is the answer in the end, and again no client will pay for it
 
9:57 AM
I don't get it. Now you press the update button in the backend.
Then you do a `composer update vendor/package` and nothing except this one package (e.g. a plugin) changes. What are you loosing?
 
I didn't say I am losing anything, just don't see the advantage, and avoid unforzeen complexities coming from autoloading dependencies
 
advantage is that your state of site is captuerd in precise machine-managed format and not "was the update button pressed at some time for some plugin by someone"
 
ok, tangent question how do you git the code?
how do you deploy to production?
The way I see it, the process is to start a branch "updates", use composer to get the updates, test that everything works, push and last step is pull to production
In the context of wordpress I do not see the difference between login to the dashboard or the command line to get the fresh source
 
10:19 AM
Composer is often misunderstood as a "Dependency Downloader" but that is just a side effect. It offer so much more, this is just a small subset of the advantages:
1. Command Line is faster than pushing buttons
2. Using the composer.lock file you are recording the exact state of the dependencies without the need to actually have all the dependencies in your git repo
3. You can easily just do minor upgrades of WP core, plugins or anything else.
4. You can detect version conflicts.
5. You can declare dependencies for your packages. If multiple packages depend on the same thing composer tries t
 
> ok, tangent question how do you git the code?
as usual. code is in your root project and/or in packages.
> how do you deploy to production?
however you want, I like simple web hook that pulls from repo on push and does composer install if necessary https://www.rarst.net/wordpress/simple-deploy/
> In the context of wordpress I do not see the difference
difference is with composer you have version-controlled lock file that describes exact state of the site. if you push bunch of updates in WP UI how do you go back to state of last week if you want to?
 
 
2 hours later…
11:53 AM
> how do you go back to state of last week if you want to?
I have a branch in git (I am lying right now, but once 1.0 will be released I will be more methodological with branches)
 
Are all plugins checked into your main git repo?
 
yes
 
This makes your repo pretty big and noisy. With composer you just store the composer.json and the composer.lock file.
This way the repo stays slim and you still know the exact state at all times.
 
12:19 PM
is every version of every plugin and every combination of versions checked into repo and appropriately tagged? :)
 
I guess what he does is just upgrade through UI and store the whole site state including plugin code in the main git repo.
 
12:33 PM
yeah, I get that :) just pointing out the limits to usefulness of such approach
 
I guess then I don't really get your remark. When you're working on a specific site you don't really care about "every combination". You just want to save a working state at some point in time.
 
let's say last week I had two plugins at 1.0 this week I updated to both to 2.0. then I find something broken and I need to go back to 1.1 for one of them, but there is no 1.1+2.0 state, so I need to create this combination and capture in version control a state that is forward chronologically in the project, but backwards chronologically for the plugin.
basically version control for dependency management only "knows" combination that had been explicitly created and captured.
not to mention how much waste in data and size going back and forth can generate.
in a nutshell version control stops making sense if parts of code base are differently versioned
 
Oh, yeah, of course. Shouldn't chat while being somewhere else mentally. ;)
 
1:13 PM
Alyssa Mazzina on May 24, 2017

About two years ago, a significant event happened at Stack Overflow: a new system, named Providence, was released. Providence would allow us to tell which technologies a visitor is interested in, and measure the “fitness” between a visitor and a job. The release of Providence marked a stepping stone in Stack Overflow’s continuous effort to be “smarter” and invest in data science, and it was only the beginning.

Aurélian Gasser, a developer on the Stack Overflow Jobs team, has detailed the long road towards building the greatest developer job search tool on the internet in his Medium post, A Dive …

 
 
1 hour later…
2:33 PM
@kraftner, @Rarst, as I said, I think this is a philosophical debate, not a technical one. If tomorrow wordpress.org will be nuked by aliens, I want to retain the ability to be able to re-deploy. this is why it is called verson control and not partial version control.
 
and we are telling this is technical debate, you are free to listen or not of course :)
 
complaining about how much diskspace git will take is for me like complaining about the disk space a backup takes. It is just needed
whether you should have dependencies or not in your project is not very technical IMO, it depends on the project
 
1. Not worried about disk space, but mainly about a noisy git log
2. You could still store built artefacts of the site including the dependencies, ideally in another repo or some kind of backup.
3. The arguments mentioned above prevail and everything you mentioned as wanted is still doable with composer
 
again I don't think there is a debate whether it is doable or not.
if we go back in time to how this thread started, it was basically "if you use composer the client will not know how to update by himself" which is true, but except for that I don't see the immediate value for me right now
 
Okay fair point. For the particular issue of the client messing up the site with updates all you need is DISALLOW_FILE_MODS
Anyway I'd highly recommend checking out composer. But I'll leave it there.
 
2:45 PM
promise I will ;)
 
:)
 
 
1 hour later…
3:53 PM
If you guys leave PhpStorm open for like.. a week straight, does it start to degrade in performance?
 
 
1 hour later…
4:58 PM
don't know, I shut down my work desktop for the night
 
 
2 hours later…
 
2 hours later…
9:22 PM
How do you remove single quotes from adding when using $wpdb->prepare();?
I'm using it to escape ORDER BY and ORDER but it's adding single quotes to it, which breaks the query.
Nevermind, different approach. wordpress.stackexchange.com/a/138980/9579
 

« first day (2412 days earlier)      last day (2532 days later) »