<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>psr-3 | Nerdpress.org</title>
	<atom:link href="https://nerdpress.org/tag/psr-3/feed/" rel="self" type="application/rss+xml" />
	<link>https://nerdpress.org</link>
	<description>...dev, tech problems and solutions.</description>
	<lastBuildDate>Fri, 04 Mar 2022 09:54:43 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>Class &#8220;Psr\Log\Test\TestLogger&#8221; not found</title>
		<link>https://nerdpress.org/2022/03/04/class-psrlogtesttestlogger-not-found/</link>
		
		<dc:creator><![CDATA[Ivo Bathke]]></dc:creator>
		<pubDate>Fri, 04 Mar 2022 09:51:23 +0000</pubDate>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[logger]]></category>
		<category><![CDATA[psr-3]]></category>
		<guid isPermaLink="false">https://nerdpress.org/?p=3114</guid>

					<description><![CDATA[<p>The psr/log package used to have not only the Interface for PSR-3 Logger, but also actual implementations of the interface like the TestLogger.The TestLogger could be used as mock for any PSR-3 Logger in your test cases. However from v3 the TestLogger was removed, so that the psr/log package would focus solely on the Interface. &#8230; </p>
<p class="link-more"><a href="https://nerdpress.org/2022/03/04/class-psrlogtesttestlogger-not-found/" class="more-link">Continue reading<span class="screen-reader-text"> "Class &#8220;Psr\Log\Test\TestLogger&#8221; not found"</span></a></p>
The post <a href="https://nerdpress.org/2022/03/04/class-psrlogtesttestlogger-not-found/">Class “Psr\Log\Test\TestLogger” not found</a> first appeared on <a href="https://nerdpress.org">Nerdpress.org</a>.]]></description>
										<content:encoded><![CDATA[<p>The <a href="https://github.com/php-fig/log" target="_blank" rel="noreferrer noopener">psr/log</a> package used to have not only the Interface for PSR-3 Logger, but also actual implementations of the interface like the TestLogger.<br />The TestLogger could be used as mock for any PSR-3 Logger in your test cases.</p>



<p>However from v3 the <a href="https://github.com/php-fig/log/commit/8beb7546e5f563f30f3cff139b88e5dd512bed34" target="_blank" rel="noreferrer noopener">TestLogger was removed</a>, so that the psr/log package would focus solely on the Interface.</p>



<p>If you used the TestLogger in your project and you or some of your dependencies upgraded <strong>psr/log</strong> to &gt;= v3 you most likely saw this error:</p>



<p><code>Class "Psr\Log\Test\TestLogger" not found</code></p>



<span id="more-3114"></span>



<p>Thanks to the community there is already a replacement for the TestLogger:<br />So just install the <a href="https://github.com/colinodell/psr-testlogger" target="_blank" rel="noreferrer noopener">https://github.com/colinodell/psr-testlogger</a> and replace the definition:</p>



<p><code>Psr\Log\Test\TestLogger:</code></p>



<p>with</p>



<p><code>ColinODell\PsrTestLogger\TestLogger:</code></p>



<p>in your code and you are good to go.</p>



<p>One file libs for the win :)</p>The post <a href="https://nerdpress.org/2022/03/04/class-psrlogtesttestlogger-not-found/">Class “Psr\Log\Test\TestLogger” not found</a> first appeared on <a href="https://nerdpress.org">Nerdpress.org</a>.]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
