ArgumentCountError caused by wp-includes/class-wp-hook.php

The number in the last argument to add_filter() needs to match the number of arguments accepted by the callback function. Your function now accepts 4 arguments:

function eodwp_menu_item_class( $classes, $item, $args, $depth) {

So that last number needs to be 4:

add_filter( 'nav_menu_css_class', 'eodwp_menu_item_class', 10, 4 );