Skip to content

Examining the state of your PHP code #2379

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Tracked by #1984
jonathanbossenger opened this issue Apr 18, 2024 · 23 comments
Closed
Tracked by #1984

Examining the state of your PHP code #2379

jonathanbossenger opened this issue Apr 18, 2024 · 23 comments
Assignees
Labels
[Content] Published Marks closed issues as content that was actually published.

Comments

@jonathanbossenger
Copy link
Collaborator

jonathanbossenger commented Apr 18, 2024

Details

  • Content type (Online Workshop, Lesson, Course, Tutorial, or Lesson Plan):Lesson
  • Content title: Examining the state of your PHP code
  • Topic description: Discover a few different ways to output or log variables in PHP
  • Audience (User, Developer, Designer, Contributor, etc.):Developer
  • Experience Level (Beginner, Intermediate, Advanced, Any):Beginner

Learning Objectives

  • Describe why it would be useful to use debugging functions.
  • List a few functions that aide debugging, with examples

Related Resources and Other Notes

Automation Code

//lesson

Copy link
Contributor

github-actions bot commented May 14, 2024

Lesson Development Checklist

  • Gather any relevant links to Support, Docs, or related material
  • Description and Objectives finalized
  • Lesson created and announced to the team for review
  • Lesson reviewed
  • Lesson video submitted and published to WPTV
  • Lesson created on Learn.WordPress.org
  • Lesson video published to YouTube
  • Lesson on Learn.WordPress.org updated with YouTube video
  • Lesson published to Learn.WordPress.org

@jonathanbossenger
Copy link
Collaborator Author

@jonathanbossenger
Copy link
Collaborator Author

@jonathanbossenger
Copy link
Collaborator Author

@agiljulio, here is the script and audio file.

I don't have a pre-existing video, because this will be a brand new lesson, so you'll have to create the visuals yourself, in the same style as the previous lesson.

Are you comfortable to take on this lesson video next?

@jonathanbossenger jonathanbossenger moved this from 👋 Ready to Create to 🚧 Drafts in Progress in LearnWP Content - Development May 14, 2024
@github-project-automation github-project-automation bot moved this to 👋 Ready to Create in LearnWP Content - Development May 14, 2024
@agiljulio
Copy link

Hi @jonathanbossenger thank you for sending the script and audio file.

Noted it, I will adjust the style to the same as the previous video.

Yes, I feel comfortable taking on this lesson for the next video, If I have any questions, I will ask here 🙏

@jonathanbossenger
Copy link
Collaborator Author

Thank you @agiljulio I look forward to reviewing the next video.

@jonathanbossenger jonathanbossenger self-assigned this May 15, 2024
@agiljulio
Copy link

Hi @jonathanbossenger the video has been edited and is ready for review. Please feel free to provide any feedback, thank you 🙏

@jonathanbossenger
Copy link
Collaborator Author

Thank you @agiljulio I will do my best to review it today or tomorrow.

@jonathanbossenger
Copy link
Collaborator Author

Hey @agiljulio sorry for the delay here. Great work on the video.

I'm going to open this for the training team to review, and then get started on the scripts and voice recordings for the next two videos. I'd like to try and get these to you by the end of this week.

@jonathanbossenger jonathanbossenger moved this from 🚧 Drafts in Progress to 🔎 Ready for Review in LearnWP Content - Development May 28, 2024
@digitalchild
Copy link
Contributor

Nice clear overview of debugging @jonathanbossenger

I have one piece of feedback, i'm not sure if I missed it.

  • When you highlight enabling debugging in the wp-config is it worth showing what that looks like in the wp-config because by default, enabling debugging does not enable the debug.log file.

@jonathanbossenger
Copy link
Collaborator Author

Thanks @digitalchild

This configuration was covered in the previous lesson in this module on enabling the debugging options. Do you think it would be beneficial to refer to this in the spot you mention?

@digitalchild
Copy link
Contributor

@jonathanbossenger Yes I think if you mention its in the previous lesson that should be enough. The reason I ask is because you have the wp-config open in the IDE :)

@jonathanbossenger
Copy link
Collaborator Author

Aha, that's a solid point. I didn't actually create the video, Agil and I are collaborating on this one.

I'm planning my own review later, so I'll keep an eye out for this.

@jonathanbossenger
Copy link
Collaborator Author

Yes I think if you mention its in the previous lesson that should be enough.

@digitalchild at 0:28 in this lesson, it directly references the "The built in WordPress debugging options" lesson, which contains the relevant settings to enable debug.log (here is the relevant section in that lesson).

As this is the next lesson in the learning pathway after that one, would you agree this is sufficient reference to that lesson, and the settings therein?

@jonathanbossenger
Copy link
Collaborator Author

Hi @agiljulio

As always, a great video. I do have a few change requests. Mostly they are adding some additional pauses in the voice, to allow viewers to take in what's on the screen.

  • at 0:58, after the transition to the IDE, would it be possible to insert a 1 second pause to show the use of error_log, before the voice explanation?
  • at 1:47 - 2:00, would it be possible to insert additional pauses in the voice to display the PHP code and the output for a few more seconds each.
  • at 2:22 could you add a pause before the var_dump explanation starts
  • 2:37 - 2:39 could you add additional pauses for the example code and output
  • 2:44 could you stay on the output in the browser here, and use annotations (eg arrows) to show how var_dump displays the value of the variable and the additional information about variable type and length.
  • at 2:57, when it's talking about var_dump not having a "return" option, the video can switch back to the code IDE
  • at 3:30, would it be possible to show a screenshot of those actual pages on the php docs, it's helpful for folks to see what that page looks like, along with the url.

Thanks in advance.

@agiljulio
Copy link

Hi @jonathanbossenger , thank you for your feedback. It was very detailed and will help me maintain the quality of the video. Here is the updated version.

@jonathanbossenger
Copy link
Collaborator Author

Thanks @agiljulio it's looking great.

I did pick up one additional small bug.

At 2:15 when you update the code to wrap print_r using the second parameter in the error_log call, you don't need the <pre> tags anymore, as the code is now logging to the debug.log

So instead of

$some_array = array( 'apple', 'banana', 'cherry' );
echo '<pre>';
error_log( print_r( $some_array, true ) );
echo '</pre>';

It should just be

$some_array = array( 'apple', 'banana', 'cherry' );
error_log( print_r( $some_array, true ) );

Apologies if this wasn't clear in the script, I'll make sure to make these examples clearer going forward.

@agiljulio
Copy link

No problem @jonathanbossenger . Here is another update. Thank you for clarifying 🙏

@jonathanbossenger
Copy link
Collaborator Author

No problem, @agiljulio. Thank you for always being open to updates and changes.

I will work on getting this video lesson published this week and share the next two scripts with you.

@jonathanbossenger jonathanbossenger moved this from 🔎 Ready for Review to ✅ Preparing to Publish in LearnWP Content - Development Jun 3, 2024
@agiljulio
Copy link

My pleasure @jonathanbossenger 🙏 I look forward to receiving the next script.

@jonathanbossenger
Copy link
Collaborator Author

@jonathanbossenger
Copy link
Collaborator Author

@jonathanbossenger
Copy link
Collaborator Author

@github-actions github-actions bot added the [Content] Published Marks closed issues as content that was actually published. label Jun 7, 2024
@github-actions github-actions bot closed this as completed Jun 7, 2024
@github-project-automation github-project-automation bot moved this from ✅ Preparing to Publish to 📜 Published or Closed in LearnWP Content - Development Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Content] Published Marks closed issues as content that was actually published.
Projects
Status: 📜 Published or Closed
Development

No branches or pull requests

3 participants