{"id":3495,"date":"2022-04-14T06:52:11","date_gmt":"2022-04-14T06:52:11","guid":{"rendered":"http:\/\/the-codest.localhost\/blog\/php-development-symfony-console-component-tips-tricks\/"},"modified":"2026-04-28T14:07:19","modified_gmt":"2026-04-28T14:07:19","slug":"%d8%aa%d8%b7%d9%88%d9%8a%d8%b1-php-%d8%aa%d8%b7%d9%88%d9%8a%d8%b1-%d8%a7%d9%84%d8%b3%d9%8a%d9%85%d9%81%d9%88%d9%86%d9%8a-%d8%ad%d9%8a%d9%84-%d9%85%d9%83%d9%88%d9%86%d8%a7%d8%aa-%d9%88%d8%ad%d8%af","status":"publish","type":"post","link":"https:\/\/thecodest.co\/ar\/blog\/php-development-symfony-console-component-tips-tricks\/","title":{"rendered":"\u062a\u0637\u0648\u064a\u0631 PHP. \u0645\u0643\u0648\u0646 \u0648\u062d\u062f\u0629 \u062a\u062d\u0643\u0645 \u0633\u064a\u0645\u0641\u0648\u0646\u064a - \u0646\u0635\u0627\u0626\u062d \u0648\u062d\u064a\u0644"},"content":{"rendered":"\n<p>If you are a <strong><a href=\"https:\/\/thecodest.co\/ar\/blog\/hire-php-developer\/\">PHP developer<\/a><\/strong> that wants to bring your <strong><a href=\"https:\/\/thecodest.co\/ar\/dictionary\/how-to-hire-a-php-developer\/\">PHP<\/a> <a href=\"https:\/\/thecodest.co\/ar\/blog\/8-key-questions-to-ask-your-software-development-outsourcing-partner\/\">software development<\/a><\/strong> to the next level this article is for you. Without further ado let&#8217;s cut to the chase.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p>You often hear:<br>\u200b<\/p>\n\n\n\n<p>PHP is only used to make <a href=\"https:\/\/thecodest.co\/ar\/blog\/find-your-ideal-stack-for-web-development\/\">web<\/a> pages<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/app\/uploads\/2024\/05\/162582498-1f4aceb2-e3a8-446e-a4d1-05afb685ed4f.png\" alt=\"image\"\/><\/figure>\n<\/blockquote>\n\n\n\n<p>\u200b<br>This is completely untrue because nowadays <strong>PHP development<\/strong> is used in many different business areas, often not so trivial at first sight.<\/p>\n\n\n\n<p>Both the <strong>PHP<\/strong> language and its environment perfectly support HTTP communication which, together with the use of the CLI environment, makes it possible to quickly create web bots, web crawlers or tools that synchronize <a href=\"https:\/\/thecodest.co\/ar\/blog\/app-data-collection-security-risks-value-and-types-explored\/\">data<\/a> in external environments.<br>\u200b<br>To support this I have some statistics that show that the Console component of the <strong>Symfony framework<\/strong>, which allows easy access to the command line, is in the TOP5 most used and downloaded <strong>Symfony<\/strong> packages of all time.<\/p>\n\n\n\n<p>\u200b<br><img decoding=\"async\" src=\"\/app\/uploads\/2024\/05\/162582546-0ab543b3-96c7-4a14-bf59-6048c8b4e772.png\" alt=\"image\"><\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u200b<\/p>\n<\/blockquote>\n\n\n\n<p>\u200b<br>At this point, we&#8217;d like to share with you a few tricks that every <strong>PHP <a href=\"https:\/\/thecodest.co\/ar\/blog\/hire-vue-js-developers\/\">developer<\/a><\/strong> should know when writing <a href=\"https:\/\/thecodest.co\/ar\/dictionary\/what-is-code-refactoring\/\">code<\/a> in <strong>PHP<\/strong> that is supposed to work in the CLI.<br>\u200b<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Interactive selection table with custom data source<\/h2>\n\n\n\n<p>\u200b<br><img decoding=\"async\" src=\"\/app\/uploads\/2024\/05\/162584453-eb4663ed-98ba-47fc-a276-39622e1d359b.png\" alt=\"image\"><br>\u200b<\/p>\n\n\n\n<p>Table rendering with the ability to choose entries from can be achieved in an easy way using <strong>Symfony<\/strong> Command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">\/\/ src\/App\/Command\/TestCommand.php\n\u200b\n    protected function execute(InputInterface $input, OutputInterface $output): int\n    {\n        $io = new SymfonyStyle($input, $output);\n        $io->title(\"Interactive selection table example\");\n\u200b\n        $table = $io->createTable();\n        $table->setHeaderTitle(\"Interactive selection table example\");\n        $table->setRows(iterator_to_array($this->tagsTableRows()));\n        $table->render();\n        $io->newLine();\n\u200b\n        return Command::SUCCESS;\n    }<span style=\"background-color: initial; font-family: inherit; font-size: inherit;\"> <\/span><\/code><\/pre>\n\n\n\n<p>\u200b<br>In above example we&#8217;re taking advantage of <a href=\"https:\/\/www.php.net\/manual\/en\/language.generators.overview.php\" rel=\"nofollow\">PHP Generators<\/a> as source of data &#8211; which helps with <a href=\"https:\/\/thecodest.co\/ar\/blog\/difference-between-elasticity-and-scalability-in-cloud-computing\/\">scalability<\/a> in future. Simple data generator for above example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">    protected function tagsTableRows(): Generator\n    {\n        $apiTagsResponse = $this-&gt;someInjectedService-&gt;getTags();\n        foreach ($apiTagsResponse as $apiTagResponse) {\n            yield [ $apiTagResponse-&gt;getName(), $apiTagResponse-&gt;getId() ];\n        }\n    }<\/code><\/pre>\n\n\n\n<p>The end result is a Table rendered in CLI.<br>\u200b<br><img decoding=\"async\" src=\"\/app\/uploads\/2024\/05\/162583456-58ebcd1b-479c-49a2-b4b6-55f93919c77c.png\" alt=\"image\"><br>\u200b<\/p>\n\n\n\n<p>To make it interactive we need to use QuestionHelper, provided as wrapper around <code>SymfonyStyle<\/code> output.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">  (...)\n    $choice = new ChoiceQuestion(\n        question: 'Which selection you choose?',\n        choices: array_reduce(\n            array: $rows,\n            callback: function($carry, $item) {\n                $carry[] = $item[0];\n\u200b\n                return $carry;\n            }\n        )\n    );\n    $answer = $io-&gt;askQuestion($choice);\n   (...)<\/code><\/pre>\n\n\n\n<p>As result, we&#8217;re getting an interactive choice field with a table display from the same source.<br>\u200b<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Always use hidden prompt for sensitive user data<\/h2>\n\n\n\n<p>\u200b<br><img decoding=\"async\" src=\"\/app\/uploads\/2024\/05\/162584679-fadbcf2c-b960-440a-994d-1eeee8c4f823.png\" alt=\"image\"><br>\u200b<\/p>\n\n\n\n<p>Hiding prompt while providing sensitive data is a common practive and it&#8217;s also easily achievable in <strong>Symfony<\/strong> Console.<br>You can use built-in wrapper in <code>SymfonyStyle<\/code> class by the following example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">  (...)\n    protected function execute(InputInterface $input, OutputInterface $output): int\n    {\n        $io = new SymfonyStyle($input, $output);\n        $io->title(\"Asking user for sensitive data\");\n        $io->askHidden(\n            question: \"Provide your <a href=\"https:\/\/thecodest.co\/ar\/blog\/compare-staff-augmentation-firms-that-excel-in-api-team-staffing-for-financial-technology-projects\/\">API<\/a> key here\",\n            validator: function($answer) { return (42 == strlen($answer)) ?? $answer; }\n        );\n\u200b\n        return Command::SUCCESS;\n    }<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Style your Progress Bars<\/h2>\n\n\n\n<p>\u200b<br><img decoding=\"async\" src=\"\/app\/uploads\/2024\/05\/162585358-58414b98-4170-4015-83f5-d66b698c4c05.png\" alt=\"image\"><br>\u200b<\/p>\n\n\n\n<p>To communicate some progress to the user we can use Progress Bars. <strong>Symfony<\/strong> Console has a great way to show progress to the user, but always remember to style your progress output correctly. You can have full controler over different parts and how they&#8217;re rendered using <code>Formatter<\/code>. The progress bar format just a string of different placeholders. The available placeholders are: <code>current<\/code>, <code>max<\/code>, <code>bar<\/code>, <code>percent<\/code>, <code>elapsed<\/code>, <code>remaining<\/code>, <code>estimated<\/code>, <code>memory<\/code> and <code>message<\/code>. Fiddle with them with the example below.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">(...)\n    protected function execute(InputInterface $input, OutputInterface $output): int\n    {\n        $io = new SymfonyStyle($input, $output);\n        $io->title(\"Styled progress bar example\");\n\u200b\n        $progressBar = new ProgressBar($io, 10000);\n        $progressBar->setFormat('&lt;comment>%current%\/%max% [%bar%] %percent:3s%%&lt;\/comment>\n                    &lt;info>%elapsed:6s%\/%estimated:-6s%&lt;\/info> &lt;error>%memory:6s%&lt;\/error>');\n        $progressBar->start();\n        for ($i = 0; $i &lt; 10000; $i++) {\n            $progressBar->advance();\n            usleep(420);\n        }\n\u200b\n        $progressBar->finish();\n        $io->newLine();\n\u200b\n        return Command::SUCCESS;\n    }<\/code><\/pre>\n\n\n\n<p>You can use almost anything as and formatter as long as your terminal is capable of displaying it. Official <strong>Symfony<\/strong> documentation<br>\u200b<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Provide suggestions to your Console Commands<\/h2>\n\n\n\n<p>\u200b<br><img decoding=\"async\" src=\"\/app\/uploads\/2024\/05\/symfony-console-autocompletion-symfony.gif\" alt=\"image\"><br>\u200b<\/p>\n\n\n\n<p>We&#8217;re used to console suggestion, autocompletion features, and such in our development life. If you&#8217;re creating console application you should consider adding it so that your users will not be confused about how to use your low-level CLI solution. <strong>PHP<\/strong> Symfony Console can provide that too, out of the box, using <code>CompletionInput<\/code> class.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">(...)\n    public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void\n    {\n        if ($input->mustSuggestArgumentValuesFor(argumentName: 'someArgument')) {\n            $suggestions->suggestValues(['someSuggestion', 'otherSuggestion']);\n        }\n    }<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Print anywhere you want<\/h2>\n\n\n\n<p>\u200b<br><strong>Symfony 5.1<\/strong> introduced a new way of handling cursor position in CLI applications. Since then it&#8217;s possible to read and write at a specific place at screen using handy <code>Cursor<\/code> class:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">(...)\n    protected function execute(InputInterface $input, OutputInterface $output): int\n    {\n        $io = new SymfonyStyle($input, $output);\n        $io->title(\"Cursor example\");\n\u200b\n        $cursor = new Cursor($io);\n        $cursor->clearScreen();\n        for ($x = 0; $x &lt;= 10; $x++) {\n            for ($y = 0; $y &lt;= 10; $y++) {\n                $cursor->moveToPosition($x, $y);\n\u200b\n                if ($y === $x) {\n                    $io->write(\".\");\n                }\n            }\n        }\n        $io->write(\"Hello, World!\");\n        $io->newLine();\n\u200b\n        return Command::SUCCESS;\n    }<\/code><\/pre>\n\n\n\n<p><img decoding=\"async\" src=\"\/app\/uploads\/2024\/05\/162586585-7e8b86c8-57ce-4fb8-9914-58f90a6e7857.png\" alt=\"image\"><br>This short list of tricks is just the tip of the iceberg. The possibilities of <strong>Symfony Console<\/strong> are endless, as evidenced by the numerous projects like Psalm, PHPStan or Composer that are based on <strong>PHP<\/strong> and used by millions of <strong>PHP developers<\/strong> around the world.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/thecodest.co\/contact\"><img decoding=\"async\" src=\"\/app\/uploads\/2024\/05\/interested_in_cooperation_.png\" alt=\"cooperation banner\"\/><\/a><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\u062a\u0645 \u0625\u0646\u0634\u0627\u0621 \u0647\u0630\u0647 \u0627\u0644\u0645\u0642\u0627\u0644\u0629 \u0628\u0647\u062f\u0641 \u0623\u0646 \u062a\u0638\u0647\u0631 \u0644\u0643 \u0627\u0644\u0646\u0635\u0627\u0626\u062d \u0648\u0627\u0644\u062d\u064a\u0644 \u0627\u0644\u0623\u0643\u062b\u0631 \u0641\u0627\u0626\u062f\u0629 \u0648\u0627\u0633\u062a\u0631\u062c\u0627\u0639\u064b\u0627 \u062d\u0648\u0644 \u062a\u0637\u0648\u064a\u0631 \u0648\u062d\u062f\u0629 \u062a\u062d\u0643\u0645 Symfony Console.<\/p>","protected":false},"author":2,"featured_media":3496,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[8],"tags":[],"class_list":["post-3495","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software-development"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>PHP Development. Symfony Console Component - Tips &amp; Tricks - The Codest<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/thecodest.co\/ar\/\u0627\u0644\u0645\u062f\u0648\u0646\u0629\/\u062a\u0637\u0648\u064a\u0631-php-\u062a\u0637\u0648\u064a\u0631-\u0627\u0644\u0633\u064a\u0645\u0641\u0648\u0646\u064a-\u062d\u064a\u0644-\u0645\u0643\u0648\u0646\u0627\u062a-\u0648\u062d\u062f\/\" \/>\n<meta property=\"og:locale\" content=\"ar_AR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PHP Development. Symfony Console Component - Tips &amp; Tricks\" \/>\n<meta property=\"og:description\" content=\"This article was created with the aim to show you the most useful and retrieving tips and tricks about Symfony Console Development.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/thecodest.co\/ar\/\u0627\u0644\u0645\u062f\u0648\u0646\u0629\/\u062a\u0637\u0648\u064a\u0631-php-\u062a\u0637\u0648\u064a\u0631-\u0627\u0644\u0633\u064a\u0645\u0641\u0648\u0646\u064a-\u062d\u064a\u0644-\u0645\u0643\u0648\u0646\u0627\u062a-\u0648\u062d\u062f\/\" \/>\n<meta property=\"og:site_name\" content=\"The Codest\" \/>\n<meta property=\"article:published_time\" content=\"2022-04-14T06:52:11+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-04-28T14:07:19+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/symfony_console_component_tips_-_tricks.png\" \/>\n\t<meta property=\"og:image:width\" content=\"960\" \/>\n\t<meta property=\"og:image:height\" content=\"540\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"thecodest\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"thecodest\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 \u062f\u0642\u0627\u0626\u0642\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/php-development-symfony-console-component-tips-tricks\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/php-development-symfony-console-component-tips-tricks\\\/\"},\"author\":{\"name\":\"thecodest\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#\\\/schema\\\/person\\\/7e3fe41dfa4f4e41a7baad4c6e0d4f76\"},\"headline\":\"PHP Development. Symfony Console Component &#8211; Tips &#038; Tricks\",\"datePublished\":\"2022-04-14T06:52:11+00:00\",\"dateModified\":\"2026-04-28T14:07:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/php-development-symfony-console-component-tips-tricks\\\/\"},\"wordCount\":546,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/php-development-symfony-console-component-tips-tricks\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/05\\\/symfony_console_component_tips_-_tricks.png\",\"articleSection\":[\"Software Development\"],\"inLanguage\":\"ar\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/thecodest.co\\\/blog\\\/php-development-symfony-console-component-tips-tricks\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/php-development-symfony-console-component-tips-tricks\\\/\",\"url\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/php-development-symfony-console-component-tips-tricks\\\/\",\"name\":\"PHP Development. Symfony Console Component - Tips & Tricks - The Codest\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/php-development-symfony-console-component-tips-tricks\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/php-development-symfony-console-component-tips-tricks\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/05\\\/symfony_console_component_tips_-_tricks.png\",\"datePublished\":\"2022-04-14T06:52:11+00:00\",\"dateModified\":\"2026-04-28T14:07:19+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/php-development-symfony-console-component-tips-tricks\\\/#breadcrumb\"},\"inLanguage\":\"ar\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/thecodest.co\\\/blog\\\/php-development-symfony-console-component-tips-tricks\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ar\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/php-development-symfony-console-component-tips-tricks\\\/#primaryimage\",\"url\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/05\\\/symfony_console_component_tips_-_tricks.png\",\"contentUrl\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/05\\\/symfony_console_component_tips_-_tricks.png\",\"width\":960,\"height\":540},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/php-development-symfony-console-component-tips-tricks\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/thecodest.co\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PHP Development. Symfony Console Component &#8211; Tips &#038; Tricks\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#website\",\"url\":\"https:\\\/\\\/thecodest.co\\\/\",\"name\":\"The Codest\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/thecodest.co\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ar\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#organization\",\"name\":\"The Codest\",\"url\":\"https:\\\/\\\/thecodest.co\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ar\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/03\\\/thecodest-logo.svg\",\"contentUrl\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/03\\\/thecodest-logo.svg\",\"width\":144,\"height\":36,\"caption\":\"The Codest\"},\"image\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/pl.linkedin.com\\\/company\\\/codest\",\"https:\\\/\\\/clutch.co\\\/profile\\\/codest\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#\\\/schema\\\/person\\\/7e3fe41dfa4f4e41a7baad4c6e0d4f76\",\"name\":\"thecodest\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ar\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g\",\"caption\":\"thecodest\"},\"url\":\"https:\\\/\\\/thecodest.co\\\/ar\\\/author\\\/thecodest\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u062a\u0637\u0648\u064a\u0631 PHP. \u0645\u0643\u0648\u0651\u0646 \u0648\u062d\u062f\u0629 \u062a\u062d\u0643\u0645 \u0633\u064a\u0645\u0641\u0648\u0646\u064a - \u0646\u0635\u0627\u0626\u062d \u0648\u062d\u064a\u0644 - The Codest","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/thecodest.co\/ar\/\u0627\u0644\u0645\u062f\u0648\u0646\u0629\/\u062a\u0637\u0648\u064a\u0631-php-\u062a\u0637\u0648\u064a\u0631-\u0627\u0644\u0633\u064a\u0645\u0641\u0648\u0646\u064a-\u062d\u064a\u0644-\u0645\u0643\u0648\u0646\u0627\u062a-\u0648\u062d\u062f\/","og_locale":"ar_AR","og_type":"article","og_title":"PHP Development. Symfony Console Component - Tips & Tricks","og_description":"This article was created with the aim to show you the most useful and retrieving tips and tricks about Symfony Console Development.","og_url":"https:\/\/thecodest.co\/ar\/\u0627\u0644\u0645\u062f\u0648\u0646\u0629\/\u062a\u0637\u0648\u064a\u0631-php-\u062a\u0637\u0648\u064a\u0631-\u0627\u0644\u0633\u064a\u0645\u0641\u0648\u0646\u064a-\u062d\u064a\u0644-\u0645\u0643\u0648\u0646\u0627\u062a-\u0648\u062d\u062f\/","og_site_name":"The Codest","article_published_time":"2022-04-14T06:52:11+00:00","article_modified_time":"2026-04-28T14:07:19+00:00","og_image":[{"width":960,"height":540,"url":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/symfony_console_component_tips_-_tricks.png","type":"image\/png"}],"author":"thecodest","twitter_card":"summary_large_image","twitter_misc":{"Written by":"thecodest","Est. reading time":"5 \u062f\u0642\u0627\u0626\u0642"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/thecodest.co\/blog\/php-development-symfony-console-component-tips-tricks\/#article","isPartOf":{"@id":"https:\/\/thecodest.co\/blog\/php-development-symfony-console-component-tips-tricks\/"},"author":{"name":"thecodest","@id":"https:\/\/thecodest.co\/#\/schema\/person\/7e3fe41dfa4f4e41a7baad4c6e0d4f76"},"headline":"PHP Development. Symfony Console Component &#8211; Tips &#038; Tricks","datePublished":"2022-04-14T06:52:11+00:00","dateModified":"2026-04-28T14:07:19+00:00","mainEntityOfPage":{"@id":"https:\/\/thecodest.co\/blog\/php-development-symfony-console-component-tips-tricks\/"},"wordCount":546,"commentCount":0,"publisher":{"@id":"https:\/\/thecodest.co\/#organization"},"image":{"@id":"https:\/\/thecodest.co\/blog\/php-development-symfony-console-component-tips-tricks\/#primaryimage"},"thumbnailUrl":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/symfony_console_component_tips_-_tricks.png","articleSection":["Software Development"],"inLanguage":"ar","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/thecodest.co\/blog\/php-development-symfony-console-component-tips-tricks\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/thecodest.co\/blog\/php-development-symfony-console-component-tips-tricks\/","url":"https:\/\/thecodest.co\/blog\/php-development-symfony-console-component-tips-tricks\/","name":"\u062a\u0637\u0648\u064a\u0631 PHP. \u0645\u0643\u0648\u0651\u0646 \u0648\u062d\u062f\u0629 \u062a\u062d\u0643\u0645 \u0633\u064a\u0645\u0641\u0648\u0646\u064a - \u0646\u0635\u0627\u0626\u062d \u0648\u062d\u064a\u0644 - The Codest","isPartOf":{"@id":"https:\/\/thecodest.co\/#website"},"primaryImageOfPage":{"@id":"https:\/\/thecodest.co\/blog\/php-development-symfony-console-component-tips-tricks\/#primaryimage"},"image":{"@id":"https:\/\/thecodest.co\/blog\/php-development-symfony-console-component-tips-tricks\/#primaryimage"},"thumbnailUrl":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/symfony_console_component_tips_-_tricks.png","datePublished":"2022-04-14T06:52:11+00:00","dateModified":"2026-04-28T14:07:19+00:00","breadcrumb":{"@id":"https:\/\/thecodest.co\/blog\/php-development-symfony-console-component-tips-tricks\/#breadcrumb"},"inLanguage":"ar","potentialAction":[{"@type":"ReadAction","target":["https:\/\/thecodest.co\/blog\/php-development-symfony-console-component-tips-tricks\/"]}]},{"@type":"ImageObject","inLanguage":"ar","@id":"https:\/\/thecodest.co\/blog\/php-development-symfony-console-component-tips-tricks\/#primaryimage","url":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/symfony_console_component_tips_-_tricks.png","contentUrl":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/symfony_console_component_tips_-_tricks.png","width":960,"height":540},{"@type":"BreadcrumbList","@id":"https:\/\/thecodest.co\/blog\/php-development-symfony-console-component-tips-tricks\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/thecodest.co\/"},{"@type":"ListItem","position":2,"name":"PHP Development. Symfony Console Component &#8211; Tips &#038; Tricks"}]},{"@type":"WebSite","@id":"https:\/\/thecodest.co\/#website","url":"https:\/\/thecodest.co\/","name":"The Codest","description":"","publisher":{"@id":"https:\/\/thecodest.co\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/thecodest.co\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ar"},{"@type":"Organization","@id":"https:\/\/thecodest.co\/#organization","name":"The Codest","url":"https:\/\/thecodest.co\/","logo":{"@type":"ImageObject","inLanguage":"ar","@id":"https:\/\/thecodest.co\/#\/schema\/logo\/image\/","url":"https:\/\/thecodest.co\/app\/uploads\/2024\/03\/thecodest-logo.svg","contentUrl":"https:\/\/thecodest.co\/app\/uploads\/2024\/03\/thecodest-logo.svg","width":144,"height":36,"caption":"The Codest"},"image":{"@id":"https:\/\/thecodest.co\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/pl.linkedin.com\/company\/codest","https:\/\/clutch.co\/profile\/codest"]},{"@type":"Person","@id":"https:\/\/thecodest.co\/#\/schema\/person\/7e3fe41dfa4f4e41a7baad4c6e0d4f76","name":"thecodest","image":{"@type":"ImageObject","inLanguage":"ar","@id":"https:\/\/secure.gravatar.com\/avatar\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g","caption":"thecodest"},"url":"https:\/\/thecodest.co\/ar\/author\/thecodest\/"}]}},"_links":{"self":[{"href":"https:\/\/thecodest.co\/ar\/wp-json\/wp\/v2\/posts\/3495","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thecodest.co\/ar\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thecodest.co\/ar\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thecodest.co\/ar\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/thecodest.co\/ar\/wp-json\/wp\/v2\/comments?post=3495"}],"version-history":[{"count":13,"href":"https:\/\/thecodest.co\/ar\/wp-json\/wp\/v2\/posts\/3495\/revisions"}],"predecessor-version":[{"id":7947,"href":"https:\/\/thecodest.co\/ar\/wp-json\/wp\/v2\/posts\/3495\/revisions\/7947"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/thecodest.co\/ar\/wp-json\/wp\/v2\/media\/3496"}],"wp:attachment":[{"href":"https:\/\/thecodest.co\/ar\/wp-json\/wp\/v2\/media?parent=3495"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thecodest.co\/ar\/wp-json\/wp\/v2\/categories?post=3495"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thecodest.co\/ar\/wp-json\/wp\/v2\/tags?post=3495"}],"curies":[{"name":"\u062f\u0628\u0644\u064a\u0648 \u0628\u064a","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}